From c332bad22cfcc8a601178d03d42dfe1963a4b517 Mon Sep 17 00:00:00 2001 From: ImmortalWrt AutoUpdate Bot Date: Sun, 13 Feb 2022 15:40:30 +0000 Subject: [PATCH 01/13] mosdns: Update to 3.1.2 Signed-off-by: ImmortalWrt AutoUpdate Bot --- net/mosdns/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mosdns/Makefile b/net/mosdns/Makefile index e007b229..f121f96e 100644 --- a/net/mosdns/Makefile +++ b/net/mosdns/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mosdns -PKG_VERSION:=3.1.1 +PKG_VERSION:=3.1.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=a863848d7520b486b467b56b413a357e7aa3537c803ab51f5e65454deaec8f51 +PKG_HASH:=e969fb0841023037ecd30914d97daabe4e12d9160b6c4c976d98b744c7a21784 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILE:=LICENSE From 43f73142873fe369f166db744b76348a81c4a69d Mon Sep 17 00:00:00 2001 From: ImmortalWrt AutoUpdate Bot Date: Mon, 14 Feb 2022 15:24:08 +0000 Subject: [PATCH 02/13] mosdns: Update to 3.2.0 Signed-off-by: ImmortalWrt AutoUpdate Bot --- net/mosdns/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mosdns/Makefile b/net/mosdns/Makefile index f121f96e..12057723 100644 --- a/net/mosdns/Makefile +++ b/net/mosdns/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mosdns -PKG_VERSION:=3.1.2 +PKG_VERSION:=3.2.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=e969fb0841023037ecd30914d97daabe4e12d9160b6c4c976d98b744c7a21784 +PKG_HASH:=72815c97e7dbbbd508d6f56a80a4dfdb0db70ed8b11de2a457a3eb1ec61fa15a PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILE:=LICENSE From 16f073f1cfa8c65cb7311c29b1c77200b9a49e41 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 17 Sep 2021 16:11:43 -0700 Subject: [PATCH 03/13] dtc: switch to compiling with meson Faster and more parallel friendly. Signed-off-by: Rosen Penev --- libs/dtc/Makefile | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile index 97c17c54..34aa7660 100644 --- a/libs/dtc/Makefile +++ b/libs/dtc/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=GPL PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk define Package/dtc SECTION:=utils @@ -38,7 +39,7 @@ endef define Package/dtc/install $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin endef @@ -53,11 +54,11 @@ endef define Package/fdt-utils/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/convert-dtsv0 $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtdump $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtget $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtput $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtoverlay $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin endef @@ -74,22 +75,20 @@ endef define Package/libfdt/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib endef -# NO_PYTHON is for disabling pylibfdt -MAKE_FLAGS += \ - PREFIX= \ - NO_PYTHON=1 \ - NO_VALGRIND=1 \ - NO_YAML=1 \ - EXTRA_CFLAGS=$(EXTRA_CFLAGS) \ +MESON_ARGS += \ + -Dtools=true \ + -Dyaml=disabled \ + -Dvalgrind=disabled \ + -Dpython=disabled define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib endef $(eval $(call BuildPackage,dtc)) From 78b747339ed31aa60fdbfea9ba532c443bcdeffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 3 Jan 2022 13:47:45 +0100 Subject: [PATCH 04/13] dtc: drop package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It has been imported as core package into OpenWrt repository. Its fdtget is required by sysupgrade on U-Boot devices so it couldn't live in an extra feed. Signed-off-by: Rafał Miłecki --- libs/dtc/Makefile | 96 ----------------------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 libs/dtc/Makefile diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile deleted file mode 100644 index 34aa7660..00000000 --- a/libs/dtc/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright (C) 2016-2019 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dtc -PKG_VERSION:=1.6.1 -PKG_RELEASE:=$(AUTORELEASE) - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473 -PKG_SOURCE_URL:=@KERNEL/software/utils/dtc - -PKG_MAINTAINER:=Yousong Zhou -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=GPL - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/meson.mk - -define Package/dtc - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Device Tree Compiler - URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git -endef - -define Package/dtc/description - Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes - as input a device-tree in a given format and outputs a device-tree in another - format for booting kernels on embedded systems. -endef - -define Package/dtc/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin -endef - - -# See Documentation/manual.txt for details about each utility -define Package/fdt-utils - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Flat Device Tree Utilities - URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git - DEPENDS:=+libfdt -endef - -define Package/fdt-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin -endef - - -define Package/libfdt - SECTION:=libs - CATEGORY:=Libraries - TITLE:=a utility library for reading and manipulating dtb files - URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git -endef - -define Package/libfdt/description - This is a library containing functions for manipulating Flat Device Trees. -endef - -define Package/libfdt/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib -endef - -MESON_ARGS += \ - -Dtools=true \ - -Dyaml=disabled \ - -Dvalgrind=disabled \ - -Dpython=disabled - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib -endef - -$(eval $(call BuildPackage,dtc)) -$(eval $(call BuildPackage,fdt-utils)) -$(eval $(call BuildPackage,libfdt)) From f313707d10313e4bae2d4db28d93af09fa4b1282 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 15 Feb 2022 03:31:36 +0800 Subject: [PATCH 05/13] golang: Update to 1.17.7, refresh patch This includes fixes for: * CVE-2022-23772: math/big: Rat.SetString may consume large amount of RAM and crash * CVE-2022-23806: crypto/elliptic: IsOnCurve returns true for invalid field elements Signed-off-by: Jeffery To --- lang/golang/golang/Makefile | 4 ++-- ...link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index f98ad1d2..b2af6a88 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk GO_VERSION_MAJOR_MINOR:=1.17 -GO_VERSION_PATCH:=6 +GO_VERSION_PATCH:=7 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:=4dc1bbf3ff61f0c1ff2b19355e6d88151a70126268a47c761477686ef94748c8 +PKG_HASH:=c108cd33b73b1911a02b697741df3dea43e01a5c4e08e409e8b3a0e3745d2b4d PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause diff --git a/lang/golang/golang/patches/001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch b/lang/golang/golang/patches/001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch index bfd861f2..4d93ad2e 100644 --- a/lang/golang/golang/patches/001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch +++ b/lang/golang/golang/patches/001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch @@ -2,7 +2,7 @@ This is https://github.com/golang/go/pull/49748 backported for Go 1.17. --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go -@@ -1388,23 +1388,18 @@ func (ctxt *Link) hostlink() { +@@ -1391,23 +1391,18 @@ func (ctxt *Link) hostlink() { } if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" { From a815d922ef35fe4d41243797a88ab21149ad6647 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Sun, 13 Feb 2022 19:03:53 -0600 Subject: [PATCH 06/13] shared-mime-info: new package Signed-off-by: W. Michael Petullo --- utils/shared-mime-info/Makefile | 53 +++++++++++++ .../001-shared-mime-info-2.1-fix-build.patch | 75 +++++++++++++++++++ .../002-shared-mime-info-2.1-no-xmlto.patch | 33 ++++++++ 3 files changed, 161 insertions(+) create mode 100644 utils/shared-mime-info/Makefile create mode 100644 utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch create mode 100644 utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch diff --git a/utils/shared-mime-info/Makefile b/utils/shared-mime-info/Makefile new file mode 100644 index 00000000..1b607ba2 --- /dev/null +++ b/utils/shared-mime-info/Makefile @@ -0,0 +1,53 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shared-mime-info +PKG_VERSION:=2.1 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_SOURCE:=shared-mime-info-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://gitlab.freedesktop.org/xdg/$(PKG_NAME)/-/archive/$(PKG_VERSION) +PKG_HASH:=37df6475da31a8b5fc63a54ba0770a3eefa0a708b778cb6366dccee96393cb60 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk + +define Package/shared-mime-info + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+glib2 +libxml2 + TITLE:=MIME-type information + URL:=https://freedesktop.org/wiki/Software/shared-mime-info/ +endef + +define Package/shared-mime-info/description + The shared-mime-info package contains a database of MIME types and their file extensions. +endef + +define Package/shared-mime-info/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/* \ + $(1)/usr/share/ +endef + +define Package/shared-mime-info/postinst +#!/bin/sh + +update-mime-database /usr/share/mime/ +endef + +$(eval $(call BuildPackage,shared-mime-info)) diff --git a/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch b/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch new file mode 100644 index 00000000..38479a3a --- /dev/null +++ b/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch @@ -0,0 +1,75 @@ +From 5a406b06792e26a83c7346b3c2443c0bd8d4cdb2 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 8 Nov 2021 18:22:47 -0500 +Subject: [PATCH] migrate from custom itstool to builtin msgfmt for creating + translated XML + +gettext upstream has supported this for a very long time (since 0.19.7 +via commit b3c2a5a242c36fbbaa0c5b17f975d6c638598a23, released in 2015), +and itstool is (mostly) a legacy of the time before gettext had proper +support for these sorts of use cases. + +This is similar to the state of intltool, which is described at +https://wiki.gnome.org/MigratingFromIntltoolToGettext + +During the port from autotools to meson, the legacy use of itstool was +faithfully translated to meson in the only way possible: by jumping +through hoops to run ninja inside ninja in order to generate the .mo +files for itstool, because meson's i18n module used a flawed design and +there was no "real" target to create those files, only a .PHONY +run_target which other rules cannot depend on. + +Although meson 0.60.0 added support for real targets for the built .mo +files, this changed the rules for output filenames, breaking the script. + +But msgfmt does not care, and anyways comes with builtin meson functions +for convenient use with XML files. So let's take this opportunity to +drop legacy dependencies and use the modern, builtin tooling, which +fixes this bug as a side effect. + +Fixes #170 +--- + .gitlab-ci.yml | 2 -- + README.md | 2 +- + data/freedesktop_generate.sh | 12 ------------ + data/meson.build | 16 +++++----------- + meson.build | 1 - + 5 files changed, 6 insertions(+), 27 deletions(-) + delete mode 100755 data/freedesktop_generate.sh + +--- a/data/meson.build ++++ b/data/meson.build +@@ -1,18 +1,12 @@ + + install_man('update-mime-database.1') + +-freedesktop_org_xml = custom_target('freedesktop.org.xml', +- input : files( +- 'freedesktop.org.xml.in', +- 'its/shared-mime-info.its', +- 'its/shared-mime-info.loc', +- ), ++freedesktop_org_xml = i18n.merge_file( ++ input: 'freedesktop.org.xml.in', + output: 'freedesktop.org.xml', +- command: [ +- find_program('freedesktop_generate.sh'), +- meson.source_root(), +- meson.build_root() +- ], ++ data_dirs: '.', ++ po_dir: '../po', ++ type: 'xml', + install: true, + install_dir: get_option('datadir') / 'mime' / 'packages', + ) +--- a/meson.build ++++ b/meson.build +@@ -20,7 +20,6 @@ config.set_quoted('VERSION', meson.proje + ############################################################################### + # Find tools + +-itstool = find_program('itstool') + xmllint = find_program('xmllint') + xmlto = find_program('xmlto') + diff --git a/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch b/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch new file mode 100644 index 00000000..59e6f037 --- /dev/null +++ b/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch @@ -0,0 +1,33 @@ +--- a/data/meson.build ++++ b/data/meson.build +@@ -15,15 +15,3 @@ install_data( + [ 'its/shared-mime-info.loc', 'its/shared-mime-info.its', ], + install_dir : get_option('datadir') / 'gettext/its' + ) +- +-custom_target('shared-mime-info-spec-html', +- input : 'shared-mime-info-spec.xml', +- output: 'shared-mime-info-spec-html', +- command: [ +- xmlto, +- '-o', '@OUTPUT@', +- 'html-nochunks', +- '@INPUT@', +- ], +- build_by_default: true, +-) +--- a/meson.build ++++ b/meson.build +@@ -18,12 +18,6 @@ config.set_quoted('PACKAGE', meson.proje + config.set_quoted('VERSION', meson.project_version()) + + ############################################################################### +-# Find tools +- +-xmllint = find_program('xmllint') +-xmlto = find_program('xmlto') +- +-############################################################################### + # Find xdgmime + + xdgmime = get_option('xdgmime-path') / 'src' From 8cee7f1378432be254aab6f7d4454f8ae0bb4f0c Mon Sep 17 00:00:00 2001 From: Siger Yang Date: Sat, 15 Jan 2022 21:18:08 +0800 Subject: [PATCH 07/13] cqueues: add cqueues(rel-20200726) to feeds Signed-off-by: Siger Yang --- lang/cqueues/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 lang/cqueues/Makefile diff --git a/lang/cqueues/Makefile b/lang/cqueues/Makefile new file mode 100644 index 00000000..0660665a --- /dev/null +++ b/lang/cqueues/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2022 Siger Yang +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cqueues +PKG_VERSION:=20200726 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Siger Yang + +PKG_MIRROR_HASH:=45bce9d3400f4c689d07ab3326610c2987424375dc575417eaafc6e5261b6009 +PKG_SOURCE_URL:=https://github.com/wahern/cqueues.git +PKG_SOURCE_VERSION:=rel-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/cqueues + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=lua cqueues + URL:=http://25thandclement.com/~william/projects/cqueues.html + DEPENDS:=+liblua +libopenssl +endef + +define Package/cqueues/description + Continuation Queues: Embeddable asynchronous networking, threading, and + notification framework for Lua on Unix. +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += $(FPIC) + +MAKE_FLAGS += \ + LUA_APIS="5.1" \ + lua51cpath="/usr/lib/lua" \ + lua51path="/usr/lib/lua" + +define Package/cqueues/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/_cqueues.so $(1)/usr/lib/lua/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/cqueues.lua $(1)/usr/lib/lua/ + + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/cqueues $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,cqueues)) From 3f4eef71e65f085abe2aa8163006babbb3591c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kerma=20G=C3=A9rald?= Date: Fri, 21 Jan 2022 10:59:00 +0100 Subject: [PATCH 08/13] lua-cs-bouncer: initial package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lua Crowdsec Bouncer module Lua module to allow ip (or not) from CrowdSec API. https://github.com/crowdsecurity/lua-cs-bouncer required for crowdsec-nginx-bouncer Signed-off-by: Kerma Gérald --- lang/lua-cs-bouncer/Makefile | 78 +++++++++++++++++++ .../files/lua-cs-bouncer.defaults | 13 ++++ 2 files changed, 91 insertions(+) create mode 100644 lang/lua-cs-bouncer/Makefile create mode 100644 lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults diff --git a/lang/lua-cs-bouncer/Makefile b/lang/lua-cs-bouncer/Makefile new file mode 100644 index 00000000..96d4ddf8 --- /dev/null +++ b/lang/lua-cs-bouncer/Makefile @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: MIT +# +# Copyright (C) 2021-2022 Gerald Kerma +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-cs-bouncer +PKG_SOURCE_DATE:=2022-01-18 +PKG_SOURCE_VERSION:=e0f68b1265c386715c1d6ab79fe9063c0a9e3d3a +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/crowdsecurity/$(PKG_NAME)/tar.gz/$(PKG_SOURCE_VERSION)? +PKG_HASH:=c7e92cc9dc023ebcd84f3632d6cf0e38a7d9f5e7bba15367247753a306b89829 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Gerald Kerma + +HOST_BUILD_DEPENDS:=lua/host +PKG_BUILD_DEPENDS:=luarocks/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/lua-cs-bouncer + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua Crowdsec Bouncer module + URL:=https://github.com/crowdsecurity/lua-cs-bouncer + DEPENDS:=+lua \ + +luasec +endef + +define Package/lua-cs-bouncer/description + Lua module to allow ip (or not) from CrowdSec API. +endef + +define Build/Compile +endef + +define Package/lua-cs-bouncer/install + $(INSTALL_DIR) $(1)/usr/lib/lua/crowdsec + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/lib/*.lua \ + $(1)/usr/lib/lua/crowdsec/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/template.conf \ + $(1)/usr/lib/lua/crowdsec/crowdsec.conf + + $(INSTALL_DIR) $(1)/usr/lib/crowdsec/lua/plugins/crowdsec + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/nginx/config.lua \ + $(1)/usr/lib/crowdsec/lua/plugins/crowdsec/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/nginx/crowdsec.lua \ + $(1)/usr/lib/crowdsec/lua/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/nginx/recaptcha.lua \ + $(1)/usr/lib/crowdsec/lua/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/nginx/access.lua \ + $(1)/usr/lib/crowdsec/lua/ + + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) \ + ./files/lua-cs-bouncer.defaults \ + $(1)/etc/uci-defaults/99_lua-cs-bouncer +endef + +define Package/lua-cs-bouncer/conffiles +/usr/lib/lua/crowdsec/crowdsec.conf +endef + +$(eval $(call BuildPackage,lua-cs-bouncer)) diff --git a/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults b/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults new file mode 100644 index 00000000..12e4a998 --- /dev/null +++ b/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults @@ -0,0 +1,13 @@ +#!/bin/sh + +CONFIG=/usr/lib/lua/crowdsec/crowdsec.conf +## Gen&ConfigApiKey +if grep -q "{API_KEY}" "$CONFIG"; then + SUFFIX=`tr -dc A-Za-z0-9 Date: Tue, 15 Feb 2022 15:43:55 +0000 Subject: [PATCH 09/13] Revert "ksmbd: update to 3.4.4" This reverts commit f42c774c96d3189ae2d2165ed374dd77aec836a5. --- kernel/ksmbd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/ksmbd/Makefile b/kernel/ksmbd/Makefile index 951a3778..fa978c99 100644 --- a/kernel/ksmbd/Makefile +++ b/kernel/ksmbd/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ksmbd -PKG_VERSION:=3.4.4 +PKG_VERSION:=3.4.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)? -PKG_HASH:=694960bd0c01de8c4dba0087515343875e6b29bc11bb6b663b8499c66fe0f842 +PKG_HASH:=939fd4829b5aeadce75b51d2b22046f4e41d2b15ee6489b37f481f33c152a6f3 PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=GPL-2.0-or-later From 679b0ff097da24a6cd0ce4d13caf2a3eea433ee2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 14 Feb 2022 17:14:15 -0800 Subject: [PATCH 10/13] ksmbd: update to 3.4.4 Signed-off-by: Rosen Penev --- kernel/ksmbd/Makefile | 4 ++-- kernel/ksmbd/patches/01-keep_kmod_metadata.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/ksmbd/Makefile b/kernel/ksmbd/Makefile index fa978c99..951a3778 100644 --- a/kernel/ksmbd/Makefile +++ b/kernel/ksmbd/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ksmbd -PKG_VERSION:=3.4.2 +PKG_VERSION:=3.4.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)? -PKG_HASH:=939fd4829b5aeadce75b51d2b22046f4e41d2b15ee6489b37f481f33c152a6f3 +PKG_HASH:=694960bd0c01de8c4dba0087515343875e6b29bc11bb6b663b8499c66fe0f842 PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=GPL-2.0-or-later diff --git a/kernel/ksmbd/patches/01-keep_kmod_metadata.patch b/kernel/ksmbd/patches/01-keep_kmod_metadata.patch index a7055299..b2c6687d 100644 --- a/kernel/ksmbd/patches/01-keep_kmod_metadata.patch +++ b/kernel/ksmbd/patches/01-keep_kmod_metadata.patch @@ -7,5 +7,5 @@ +#undef CONFIG_MODULE_STRIPPED + #include - #include + #include "unicode.h" From 15f73af605aa595ed01344dad33394ce33b306c4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 14 Feb 2022 18:31:34 -0800 Subject: [PATCH 11/13] ksmbd-tools: update to 3.4.4 Signed-off-by: Rosen Penev --- net/ksmbd-tools/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile index ad74c28e..5dcc7c82 100644 --- a/net/ksmbd-tools/Makefile +++ b/net/ksmbd-tools/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ksmbd-tools -PKG_VERSION:=3.4.2 +PKG_VERSION:=3.4.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)? -PKG_HASH:=fb79bf9201321adb33f8a5f0a12bd205a86b2d4bb057a9f98e0e9521664c2bcd +PKG_HASH:=cc7cc2fcbeed052176894a8dbbf290919c3735b320401c6492cf17f1ba1a3548 PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=GPL-2.0-or-later From 00972ca4a1346d7fdf4eda54b358786a2e9f1cca Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 29 Jan 2022 17:21:46 -0800 Subject: [PATCH 12/13] btrfs-progs: update to 5.16.1 Disable libudev to avoid dependency. Backport patch to fix 64-bit int types under ppc64 and mips64. Signed-off-by: Rosen Penev --- utils/btrfs-progs/Makefile | 7 ++-- utils/btrfs-progs/patches/010-64bit.patch | 43 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 utils/btrfs-progs/patches/010-64bit.patch diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile index 8ce482fa..9c62d2ff 100644 --- a/utils/btrfs-progs/Makefile +++ b/utils/btrfs-progs/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=btrfs-progs -PKG_VERSION:=5.11 -PKG_RELEASE:=1 +PKG_VERSION:=5.16.1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs -PKG_HASH:=d41961b0a92160c80f894ad9a1882822889c2e1d084cbf3e08b8c214a5cf0137 +PKG_HASH:=3da4da5361cf86bddda80edb4c4f30ea076cb4ebec29904fa08afc930ef9e1a8 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) PKG_MAINTAINER:=Karel Kočí @@ -65,6 +65,7 @@ CONFIGURE_ARGS += \ --disable-backtrace \ --disable-convert \ --disable-documentation \ + --disable-libudev \ --disable-python ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y) CONFIGURE_ARGS += --disable-zstd diff --git a/utils/btrfs-progs/patches/010-64bit.patch b/utils/btrfs-progs/patches/010-64bit.patch new file mode 100644 index 00000000..51d66095 --- /dev/null +++ b/utils/btrfs-progs/patches/010-64bit.patch @@ -0,0 +1,43 @@ +From b5159062f079d451f23d7f2a0e7d9e2f84934f94 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 29 Jan 2022 17:09:56 -0800 +Subject: [PATCH] btrfs-progs: fix 64-bit mips and powerpc types + +The kernel uses 'unsigned long' for u64 specifically for ppc64 and +mips64. + +Remove asm/types.h include as it will get included properly later. + +Fixe -Wformat warnings. + +Signed-off-by: Rosen Penev +Signed-off-by: David Sterba +--- + cmds/receive-dump.c | 1 - + kerncompat.h | 5 +++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/cmds/receive-dump.c ++++ b/cmds/receive-dump.c +@@ -31,7 +31,6 @@ + #include + #include + #include +-#include + #include + #include "common/utils.h" + #include "cmds/commands.h" +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -19,6 +19,11 @@ + #ifndef __KERNCOMPAT_H__ + #define __KERNCOMPAT_H__ + ++#ifndef __SANE_USERSPACE_TYPES__ ++/* For PPC64 to get LL64 types */ ++#define __SANE_USERSPACE_TYPES__ ++#endif ++ + #include + #include + #include From faa4a71d15a793febd346cdd609698aceb54e3ba Mon Sep 17 00:00:00 2001 From: W_Y_CPP <383152993@qq.com> Date: Tue, 15 Feb 2022 23:31:38 -0500 Subject: [PATCH 13/13] btrfs-progs: fix btrfs-progs not provide blk_zone --- utils/btrfs-progs/Makefile | 1 + ...-improve-autodetection-of-zoned-mode.patch | 51 +++++++++++++++++++ ...progs-v5.16.1-add-missing-definition.patch | 14 +++++ 3 files changed, 66 insertions(+) create mode 100644 utils/btrfs-progs/patches/0001-improve-autodetection-of-zoned-mode.patch create mode 100644 utils/btrfs-progs/patches/0002-btrfs-progs-v5.16.1-add-missing-definition.patch diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile index 9c62d2ff..3d343942 100644 --- a/utils/btrfs-progs/Makefile +++ b/utils/btrfs-progs/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=acl +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/utils/btrfs-progs/patches/0001-improve-autodetection-of-zoned-mode.patch b/utils/btrfs-progs/patches/0001-improve-autodetection-of-zoned-mode.patch new file mode 100644 index 00000000..b26a875a --- /dev/null +++ b/utils/btrfs-progs/patches/0001-improve-autodetection-of-zoned-mode.patch @@ -0,0 +1,51 @@ +From a065c28f8d6c5785d9c3730cb62078b8dbb4dc91 Mon Sep 17 00:00:00 2001 +From: W_Y_CPP <383152993@qq.com> +Date: Tue, 15 Feb 2022 22:40:18 -0500 +Subject: [PATCH] improve autodetection of zoned mode + +--- + configure.ac | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 26d8510..2b16249 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -282,10 +282,32 @@ AC_CHECK_HEADER(linux/blkzoned.h, [blkzoned_found=yes], [blkzoned_found=no]) + AC_CHECK_MEMBER([struct blk_zone.capacity], [blkzoned_capacity=yes], [blkzoned_capacity=no], [[#include ]]) + AX_CHECK_DEFINE([linux/blkzoned.h], [BLKGETZONESZ], [blkzoned_getzonesz=yes], [blkzoned_getzonesz=no]) + AC_ARG_ENABLE([zoned], +- AS_HELP_STRING([--disable-zoned], [disable zoned block device support]), +- [], [enable_zoned=$blkzoned_found] ++ AS_HELP_STRING([--disable-zoned], [disable zoned block device support (default: detect)]), ++ [], [enable_zoned=$blkzoned_capacity] + ) + ++# Autodetect zoned support ++AS_IF([test "x$enableval" = "x"], [ ++ cansupportzoned=yes ++ if test "x$blkzoned_found" = xno; then ++ cansupportzoned=no ++ fi ++ if test "x$blkzoned_capacity" = xno; then ++ cansupportzoned=no ++ fi ++ if test "x$blkzoned_getzonesz" = xno; then ++ cansupportzoned=no ++ fi ++ if test "x$cansupportzoned" = xno; then ++ AC_MSG_NOTICE([insufficient support for zoned mode, cannot enable]) ++ enable_zoned=no ++ else ++ enable_zoned=yes ++ fi ++]) ++ ++# Explicitly requested by --enable-zoned ++ + AS_IF([test "x$enable_zoned" = xyes], [ + if test "x$blkzoned_found" = xno; then + AC_MSG_ERROR([Couldn't find linux/blkzoned.h]) +-- +2.17.1 + diff --git a/utils/btrfs-progs/patches/0002-btrfs-progs-v5.16.1-add-missing-definition.patch b/utils/btrfs-progs/patches/0002-btrfs-progs-v5.16.1-add-missing-definition.patch new file mode 100644 index 00000000..5d27c3be --- /dev/null +++ b/utils/btrfs-progs/patches/0002-btrfs-progs-v5.16.1-add-missing-definition.patch @@ -0,0 +1,14 @@ +--- btrfs-progs-v5.16.1/kernel-shared/zoned.h.orig 2022-02-06 11:09:39.728318915 +0000 ++++ btrfs-progs-v5.16.1/kernel-shared/zoned.h 2022-02-06 11:11:21.772323202 +0000 +@@ -145,6 +145,11 @@ static inline int btrfs_reset_dev_zone(i + return 0; + } + ++static inline bool zoned_profile_supported(u64 flags) ++{ ++ return false; ++} ++ + static inline bool zone_is_sequential(struct btrfs_zoned_device_info *zinfo, + u64 bytenr) + {