From 0ad7a2fe1841a46107b88026a3b95b54571afb88 Mon Sep 17 00:00:00 2001 From: Stanislav Petrashov Date: Thu, 20 Oct 2022 22:18:19 +0200 Subject: [PATCH 1/5] golang: update to v1.19.2 Includes fixes for security vulnerabilities: * [CVE-2022-27664](https://github.com/advisories/GHSA-69cg-p879-7622) net/http: handle server errors after sending GOAWAY * [CVE-2022-32190](https://github.com/golang/go/issues/54385) net/url: JoinPath does not strip relative path components in all circumstances * [CVE-2022-2879](https://github.com/golang/go/issues/54853) archive/tar: unbounded memory consumption when reading headers * [CVE-2022-2880](https://github.com/golang/go/issues/54663) net/http/httputil: ReverseProxy should not forward unparseable query parameters * [CVE-2022-41715](https://github.com/golang/go/issues/55949) regexp/syntax: limit memory used by parsing regexps Addresses the build failure: * https://github.com/openwrt/packages/pull/19613 Signed-off-by: Stanislav Petrashov --- lang/golang/golang/Makefile | 6 +++--- ...nk-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index 4f45ff6e6..b12de9bed 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk -GO_VERSION_MAJOR_MINOR:=1.18 -GO_VERSION_PATCH:=8 +GO_VERSION_MAJOR_MINOR:=1.19 +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:=1f79802305015479e77d8c641530bc54ec994657d5c5271e0172eb7118346a12 +PKG_HASH:=2ce930d70a931de660fdaf271d70192793b1b240272645bf0275779f6704df6b 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 d65cd9856..7eb40a474 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 @@ -13,7 +13,7 @@ Fixes #22040. --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go -@@ -1392,25 +1392,20 @@ func (ctxt *Link) hostlink() { +@@ -1502,25 +1502,20 @@ func (ctxt *Link) hostlink() { } if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" { From 440dcd8d34d139e4e80fff51b7799e41d8f1196e Mon Sep 17 00:00:00 2001 From: Stanislav Petrashov Date: Wed, 23 Nov 2022 22:06:14 +0100 Subject: [PATCH 2/5] golang: update to v1.19.3 Signed-off-by: Stanislav Petrashov --- lang/golang/golang/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index b12de9bed..38b7b2430 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk GO_VERSION_MAJOR_MINOR:=1.19 -GO_VERSION_PATCH:=2 +GO_VERSION_PATCH:=3 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:=2ce930d70a931de660fdaf271d70192793b1b240272645bf0275779f6704df6b +PKG_HASH:=18ac263e39210bcf68d85f4370e97fb1734166995a1f63fb38b4f6e07d90d212 PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause From 8f3a4366f01cfa0e8562d42aec06669dac09d466 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 15 Nov 2022 17:11:39 -0800 Subject: [PATCH 3/5] libgphoto2: update to 2.5.30 Signed-off-by: Rosen Penev --- libs/libgphoto2/Makefile | 34 ++------ .../patches/001-automake-compat.patch | 20 ----- ...2-no-docs-examples-test-translations.patch | 83 ------------------- 3 files changed, 7 insertions(+), 130 deletions(-) delete mode 100644 libs/libgphoto2/patches/001-automake-compat.patch delete mode 100644 libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch diff --git a/libs/libgphoto2/Makefile b/libs/libgphoto2/Makefile index 3e69de332..91a27f01d 100644 --- a/libs/libgphoto2/Makefile +++ b/libs/libgphoto2/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgphoto2 -PKG_VERSION:=2.5.26 -PKG_RELEASE:=3 -PORT_VERSION:=0.12.0 +PKG_VERSION:=2.5.30 +PKG_RELEASE:=1 +PORT_VERSION:=0.12.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/gphoto -PKG_HASH:=7740fea3cbb78489071cdfec06c07fab528e69e27ac82734eae6a73eaeeabcd4 +PKG_HASH:=ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4 PKG_MAINTAINER:=Leonardo Medici PKG_LICENSE:=LGPL-2.1-or-later @@ -436,7 +436,7 @@ CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --disable-rpath \ - --with-camlibs="all,outdated" \ + --with-camlibs="standard,outdated" \ --with-gdlib=no \ --with-libexif=no \ --with-libusb=no \ @@ -446,29 +446,9 @@ CONFIGURE_ARGS += \ --without-jpeg \ --without-libiconv-prefix \ --without-libintl-prefix \ + --with-pic -CONFIGURE_VARS += \ - CPPFLAGS="$$$$CPPFLAGS $(ICONV_CFLAGS)" \ - LDFLAGS="$$$$LDFLAGS $(ICONV_LDFLAGS)" \ - LIBUSB_CFLAGS="$$$$CPPFLAGS" \ - LIBUSB_LIBS="$$$$LDFLAGS -lusb" \ - LIBS="-lltdl" \ - -# LIBEXIF_CFLAGS="$$$$CPPFLAGS" \ -# LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \ - -# If OpenWrt is using the iconv stub, we disable iconv support -# in libgphoto2 entirely since the stub lacks some essential -# conversions like UCS-2 to UTF-8 which will let certain drivers -# fail with "Failed to create iconv converter" . -ifneq ($(ICONV_FULL),1) - CONFIGURE_VARS += am_cv_func_iconv=no am_cv_lib_iconv=no -endif - -MAKE_FLAGS += \ - LIBLTDL="" \ - -TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl) -lltdl define Build/InstallDev $(INSTALL_DIR) $(1)/usr/bin diff --git a/libs/libgphoto2/patches/001-automake-compat.patch b/libs/libgphoto2/patches/001-automake-compat.patch deleted file mode 100644 index e29cfbd4b..000000000 --- a/libs/libgphoto2/patches/001-automake-compat.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -244,7 +244,6 @@ ALL_LINGUAS="cs da de es eu fr hu it ja - GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}]) - AM_GNU_GETTEXT_VERSION([0.14.1]) - AM_GNU_GETTEXT([external]) --AM_PO_SUBDIRS() - AM_ICONV() - GP_GETTEXT_FLAGS() - ---- a/libgphoto2_port/configure.ac -+++ b/libgphoto2_port/configure.ac -@@ -124,7 +124,6 @@ GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2 - ALL_LINGUAS="cs da de es eu fi fr it ja nl pl pt_BR ru sk sr sv uk vi zh_CN zh_TW" - AM_GNU_GETTEXT_VERSION([0.14.1]) - AM_GNU_GETTEXT([external]) --AM_PO_SUBDIRS() - AM_ICONV() - GP_GETTEXT_FLAGS() - diff --git a/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch b/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch deleted file mode 100644 index 4abfb89d6..000000000 --- a/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -9,7 +9,7 @@ EXTRA_DIST = MAINTAINERS TESTERS install - EXTRA_DIST += HACKING.md SECURITY.md - - # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS() --SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc gphoto-m4 -+SUBDIRS = @subdirs@ libgphoto2 camlibs packaging gphoto-m4 - - EXTRA_DIST += libgphoto2.pc.in - pkgconfig_DATA = libgphoto2.pc ---- a/Makefile.in -+++ b/Makefile.in -@@ -503,7 +503,7 @@ EXTRA_DIST = MAINTAINERS TESTERS install - README.packaging - - # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS() --SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc gphoto-m4 -+SUBDIRS = @subdirs@ libgphoto2 camlibs packaging gphoto-m4 - pkgconfig_DATA = libgphoto2.pc - noinst_DATA = libgphoto2-uninstalled.pc - doc_DATA = AUTHORS COPYING NEWS ABOUT-NLS ChangeLog README.md \ ---- a/configure.ac -+++ b/configure.ac -@@ -706,20 +706,11 @@ gphoto-m4/Makefile - libgphoto2/Makefile - libgphoto2.pc - libgphoto2-uninstalled.pc --examples/Makefile --tests/Makefile --tests/ddb/Makefile --tests/ddb/check-ddb.sh - packaging/Makefile - packaging/linux-hotplug/Makefile - packaging/generic/Makefile - packaging/rpm/Makefile - packaging/rpm/package.spec --po/Makefile.in --doc/Makefile --doc/Doxyfile --doc/Doxyfile-internals --doc/api/Makefile - ],[ - dnl This relies on this code being called for each of the above files - dnl with ac_file set to the filename. ---- a/libgphoto2_port/Makefile.am -+++ b/libgphoto2_port/Makefile.am -@@ -25,7 +25,7 @@ udevscript_PROGRAMS = - bin_SCRIPTS = gphoto2-port-config - - # The . stands for the current dir, i.e. the iolibs to build. --SUBDIRS = po libgphoto2_port test . doc gphoto-m4 -+SUBDIRS = libgphoto2_port . gphoto-m4 - - - ######################################################################## ---- a/libgphoto2_port/Makefile.in -+++ b/libgphoto2_port/Makefile.in -@@ -581,7 +581,7 @@ EXTRA_LTLIBRARIES = disk.la ptpip.la ser - bin_SCRIPTS = gphoto2-port-config - - # The . stands for the current dir, i.e. the iolibs to build. --SUBDIRS = po libgphoto2_port test . doc gphoto-m4 -+SUBDIRS = libgphoto2_port . gphoto-m4 - - ######################################################################## - # All iolibs are defined as EXTRA_LTLIBRARIES. This requires that ---- a/libgphoto2_port/configure.ac -+++ b/libgphoto2_port/configure.ac -@@ -536,13 +536,10 @@ AC_SUBST([AM_LDFLAGS]) - # --------------------------------------------------------------------------- - AC_CONFIG_FILES([ - Makefile --po/Makefile.in - libgphoto2_port/Makefile - libgphoto2_port.pc - libgphoto2_port-uninstalled.pc - gphoto2-port-config --test/Makefile --doc/Makefile - gphoto-m4/Makefile - ]) - AC_OUTPUT From dc3ab606d561e47f1469f97242919ee241885056 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 15 Nov 2022 17:19:51 -0800 Subject: [PATCH 4/5] gphoto2: update to 2.5.28 Signed-off-by: Rosen Penev --- multimedia/gphoto2/Makefile | 4 +- .../gphoto2/patches/001-automake-compat.patch | 40 ------------------- .../gphoto2/patches/002-no-docs-test.patch | 38 ------------------ 3 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 multimedia/gphoto2/patches/001-automake-compat.patch delete mode 100644 multimedia/gphoto2/patches/002-no-docs-test.patch diff --git a/multimedia/gphoto2/Makefile b/multimedia/gphoto2/Makefile index a4990a71e..42c49a99f 100644 --- a/multimedia/gphoto2/Makefile +++ b/multimedia/gphoto2/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gphoto2 -PKG_VERSION:=2.5.26 +PKG_VERSION:=2.5.28 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/gphoto -PKG_HASH:=7653213b05329c1dc2779efea3eff00504e12011436587aedc9aaa1e8665ab2f +PKG_HASH:=2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375 PKG_MAINTAINER:=Leonardo Medici PKG_LICENSE:=GPL-2.0 diff --git a/multimedia/gphoto2/patches/001-automake-compat.patch b/multimedia/gphoto2/patches/001-automake-compat.patch deleted file mode 100644 index c2930c6d8..000000000 --- a/multimedia/gphoto2/patches/001-automake-compat.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests -+SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests - - ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 - EXTRA_DIST = README.md ---- a/Makefile.in -+++ b/Makefile.in -@@ -389,7 +389,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests -+SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests - ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 - EXTRA_DIST = README.md - all: config.h ---- a/configure.ac -+++ b/configure.ac -@@ -58,10 +58,7 @@ dnl ------------------------------------ - GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}]) - ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW" - AM_GNU_GETTEXT_VERSION([0.14.1]) --AM_GNU_GETTEXT([external]) --AM_PO_SUBDIRS() - AM_ICONV() --GP_GETTEXT_FLAGS() - - dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as - dnl we require make to do insert the proper $(datadir) value -@@ -406,7 +403,6 @@ AC_SUBST([AM_LDFLAGS]) - # Create output files - # --------------------------------------------------------------------------- - AC_CONFIG_FILES([ --po/Makefile.in - Makefile - gphoto2/Makefile - gphoto-m4/Makefile diff --git a/multimedia/gphoto2/patches/002-no-docs-test.patch b/multimedia/gphoto2/patches/002-no-docs-test.patch deleted file mode 100644 index 92d13af28..000000000 --- a/multimedia/gphoto2/patches/002-no-docs-test.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests -+SUBDIRS = gphoto-m4 contrib gphoto2 packaging - - ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 - EXTRA_DIST = README.md ---- a/Makefile.in -+++ b/Makefile.in -@@ -389,7 +389,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests -+SUBDIRS = gphoto-m4 contrib gphoto2 packaging - ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 - EXTRA_DIST = README.md - all: config.h ---- a/configure.ac -+++ b/configure.ac -@@ -406,16 +406,10 @@ AC_CONFIG_FILES([ - Makefile - gphoto2/Makefile - gphoto-m4/Makefile --doc/Makefile - contrib/Makefile - packaging/Makefile - packaging/rpm/Makefile - packaging/rpm/package.spec --tests/data/Makefile --tests/staging/subdir1/Makefile --tests/staging/subdir2/Makefile --tests/staging/Makefile --tests/Makefile - ]) - AC_OUTPUT()dnl - From f4058c1c18138ae1011abfe0e7aca74659834b21 Mon Sep 17 00:00:00 2001 From: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com> Date: Thu, 24 Nov 2022 12:08:30 +0100 Subject: [PATCH 5/5] gnupg: compile with -fcommon This fixes a segfault because gnupg/g10/options.h struct opt is otherwise not shared between the different compilation units, resulting in opt.homedir being NULL when passed to make_filename. $ gpg1 -i gpg: signal 11 caught ... exiting Segmentation fault (gdb) bt #0 0x00007f17bb2185e2 in strlen (s=s@entry=0x0) at src/string/strlen.c:17 #1 0x0000000000460ea0 in make_filename (first_part=first_part@entry=0x0) at gnupg-1.4.23/util/fileutil.c:174 #2 0x000000000040ee42 in keydb_add_resource (url=url@entry=0x46bfe3 "secring.gpg", flags=flags@entry=4, secret=secret@entry=1) at gnupg-1.4.23/g10/keydb.c:238 #3 0x00000000004062ee in main (argc=, argv=) at gnupg-1.4.23/g10/gpg.c:3323 Signed-off-by: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com> --- utils/gnupg/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/gnupg/Makefile b/utils/gnupg/Makefile index 1974d34e0..455c2fb67 100644 --- a/utils/gnupg/Makefile +++ b/utils/gnupg/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnupg PKG_VERSION:=1.4.23 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/gnupg @@ -87,7 +87,7 @@ CONFIGURE_ARGS += \ MAKE_FLAGS += \ SUBDIRS="m4 intl zlib util mpi cipher tools g10 keyserver ${checks}" \ -TARGET_CFLAGS += -DEXTERN_UNLESS_MAIN_MODULE=static +TARGET_CFLAGS += -fcommon define Package/gnupg/install $(INSTALL_DIR) $(1)/usr/bin