Skip to content

Commit

Permalink
Merge Official Source
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Dec 20, 2024
2 parents 24e1497 + 49ebe6a commit 22fa218
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 40 deletions.
2 changes: 1 addition & 1 deletion libs/yajl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=yajl
PKG_VERSION:=2.1.0
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/lloyd/yajl
Expand Down
41 changes: 41 additions & 0 deletions libs/yajl/patches/010-CVE-2023-33460.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 31531a6e6b5641398237ce15b7e62da02d975fc6 Mon Sep 17 00:00:00 2001
From: Like Ma <[email protected]>
Date: Sat, 2 Dec 2023 19:55:55 +0800
Subject: [PATCH] Fix for CVE-2023-33460a

Memory leak in yajl 2.1.0 with use of yajl_tree_parse function
See https://github.com/lloyd/yajl/issues/250#issuecomment-1628695214

Origin: https://github.com/openEuler-BaseService/yajl/commit/23a122eddaa28165a6c219000adcc31ff9a8a698
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039984
Bug: https://github.com/lloyd/yajl/issues/250
---
src/yajl_tree.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

--- a/src/yajl_tree.c
+++ b/src/yajl_tree.c
@@ -143,7 +143,7 @@ static yajl_val context_pop(context_t *c
ctx->stack = stack->next;

v = stack->value;
-
+ free (stack->key);
free (stack);

return (v);
@@ -444,7 +444,14 @@ yajl_val yajl_tree_parse (const char *in
snprintf(error_buffer, error_buffer_size, "%s", internal_err_str);
YA_FREE(&(handle->alloc), internal_err_str);
}
+ while(ctx.stack != NULL) {
+ yajl_val v = context_pop(&ctx);
+ yajl_tree_free(v);
+ }
yajl_free (handle);
+ //If the requested memory is not released in time, it will cause memory leakage
+ if(ctx.root)
+ yajl_tree_free(ctx.root);
return NULL;
}

11 changes: 0 additions & 11 deletions libs/yajl/patches/100-link-reformatter-uclibc-libm.patch

This file was deleted.

8 changes: 0 additions & 8 deletions libs/yajl/patches/101-link-perf-uclibc-libm.patch

This file was deleted.

100 changes: 100 additions & 0 deletions net/netatalk/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#
# Copyright (C) 2009-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=netatalk
PKG_VERSION:=4.0.7
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/netatalk
PKG_HASH:=64ab20c888de061468c4b49dcb703a68c31b6157b3957557f8d302558f0c4c21

PKG_MAINTAINER:=Antonio Pastor <[email protected]>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:netatalk:netatalk

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk

define Package/netatalk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
TITLE:=Netatalk - Apple Filing Protocol (AFP) file server.
URL:=http://netatalk.sourceforge.net
DEPENDS:=+libevent2 +libdb47 +libgcrypt
endef

define Package/netatalk/description
Netatalk is an Open Source Apple Filing Protocol (AFP) fileserver.
Implements a service that allows Macintosh file sharing
and Time Machine backups. Modern MacOS prefers Samba network shares
but AFP has shown superior throughput. High Sierra and older MacOS
only support AFP for Time Machine backups.
Includes support of AppleTalk protocols to network with pre-OSX Macs.
endef

MESON_ARGS += \
-Dwith-appletalk=true \
-Dwith-zeroconf=false \
-Dwith-cups=false \
-Dwith-quota=false \
-Dwith-afpstats=false \
-Dwith-acls=false \
-Dwith-ldap=false \
-Dwith-cnid-default-backend=dbd \
-Dwith-cnid-dbd-backend=true \
-Dwith-cnid-mysql-backend=false \
-Dwith-pam=false \
-Dwith-tests=false \
-Dwith-testsuite=false \
-Dwith-bdb-path="$(STAGING_DIR)/usr/" \
-Dwith-unicode-data-path="$(STAGING_DIR_HOST)/share/gnulib/tests/uniname/" \
-Dwith-libgcrypt-path="$(STAGING_DIR)/usr/" \
-Dwith-kerberos=false \
-Dwith-krbV-uam=false \
-Dwith-libiconv=false \
-Dwith-spotlight=false \
$(if $(CONFIG_SHADOW_PASSWORDS),-Dwith-shadow=true,-Dwith-shadow=false) \
-Dwith-dtrace=false \
-Dwith-tcp-wrappers=false \
-Dwith-debug=false \
-Dwith-shell-check=false \
-Dwith-readmes=false \
-Dwith-manual=none \
-Dwith-init-style=none \

define Package/netatalk/conffiles
/etc/afp.conf
/etc/extmap.conf
/etc/netatalk/
/etc/atalkd.conf
/etc/papd.conf
endef

define Package/netatalk/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/netatalk
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libatalk.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/netatalk/*.so $(1)/usr/lib/netatalk/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/afp.conf $(1)/etc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/extmap.conf $(1)/etc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/papd.conf $(1)/etc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/atalkd.conf $(1)/etc/
$(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/afpd
endef

$(eval $(call BuildPackage,netatalk))
23 changes: 23 additions & 0 deletions net/netatalk/files/afpd.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2012 OpenWrt.org

START=80
STOP=10

USE_PROCD=1

start_service() {
mkdir -p /var/netatalk/CNID/

procd_open_instance
procd_set_param command /usr/sbin/afpd -d -F /etc/afp.conf
procd_set_param file /etc/afp.conf
procd_set_param respawn
procd_close_instance

procd_open_instance
procd_set_param command /usr/sbin/cnid_metad -d
procd_set_param respawn
procd_close_instance
}

2 changes: 1 addition & 1 deletion net/travelmate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=travelmate
PKG_VERSION:=2.1.3
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <[email protected]>

Expand Down
4 changes: 2 additions & 2 deletions net/travelmate/files/travelmate.init
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ start_service() {
procd_set_param command "${trm_script}" "${@}"
procd_set_param pidfile "${trm_pidfile}"
procd_set_param nice "$(uci_get travelmate global trm_nice "0")"
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param stdout 0
procd_set_param stderr 0
procd_close_instance
fi
}
Expand Down
4 changes: 2 additions & 2 deletions net/travelmate/files/travelmate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ f_env() {

if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]; then
option_cb() {
local option="${1}" value="${2}"
local option="${1}" value="${2//\"/\\\"}"
eval "${option}=\"${value}\""
}
list_cb() {
local option="${1}" value="${2}"
local option="${1}" value="${2//\"/\\\"}"
if [ "${option}" = "trm_vpnifacelist" ] && ! printf "%s" "${trm_vpnifacelist}" | "${trm_grepcmd}" -q "${value}"; then
eval "trm_vpnifacelist=\"$(printf "%s" "${trm_vpnifacelist}") ${value}\""
fi
Expand Down
12 changes: 6 additions & 6 deletions net/v2ray-geodata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ PKG_MAINTAINER:=Tianling Shen <[email protected]>

include $(INCLUDE_DIR)/package.mk

GEOIP_VER:=202410030052
GEOIP_VER:=202411140052
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
URL_FILE:=geoip.dat
FILE:=$(GEOIP_FILE)
HASH:=061c2116e650932c8058b663c14cd03be2241c6048bba6a2765ee1ea38481bff
HASH:=c9114fd3157e44f1234976a3cba6d8ffee28fb8331890f0909d64e5b6677494e
endef

GEOSITE_VER:=20240920063125
GEOSITE_VER:=20241112092643
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE)
HASH:=aeefcd8b3e5b27c22e2e7dfb6ff5e8d0741fd540d96ab355fd00a0472f5884a7
HASH:=f04433837b88a3f49d7cd6517c91e8f5de4e4496f3d88ef3b7c6be5bb63f4c6f
endef

GEOSITE_IRAN_VER:=202409300035
GEOSITE_IRAN_VER:=202411110034
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
define Download/geosite-ir
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
URL_FILE:=iran.dat
FILE:=$(GEOSITE_IRAN_FILE)
HASH:=b10725db0a82d919cc72cd161dec4b14b6870c760322f6e503c55de3c1828f3d
HASH:=57ebf16e74ef4baaaa2e39c7489784f5ae7f2bf87bc1c7fe9a3f9d1c5e4026a9
endef

define Package/v2ray-geodata/template
Expand Down
4 changes: 2 additions & 2 deletions net/xray-core/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=xray-core
PKG_VERSION:=24.9.30
PKG_VERSION:=24.11.21
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=0771120ddbf866fba44f2e8978bcc20f3843663f5726bd8db9e03e1a27e1212a
PKG_HASH:=e45ad1fa11457101776d2c0d7ed8ed7c669b714e7687a85830e44a6e4a52fe05

PKG_MAINTAINER:=Tianling Shen <[email protected]>
PKG_LICENSE:=MPL-2.0
Expand Down
7 changes: 0 additions & 7 deletions utils/lrzsz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ define Package/lrzsz/description
from a variety of programs running under various operating systems.
endef

# to stop automake from running, the bundled autohell crap is too old
define Build/Configure
touch $(PKG_BUILD_DIR)/*
touch $(PKG_BUILD_DIR)/*/*
$(call Build/Configure/Default)
endef

define Package/lrzsz/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lrz $(1)/usr/bin/
Expand Down
72 changes: 72 additions & 0 deletions utils/lrzsz/patches/300-neutralize-autofoo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
autofoo stuff is really ancient, so lets make sure, that its never called.

Fixes: openwrt/packages/issues/25543
Signed-off-by: Petr Štetiar <[email protected]>
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,7 +92,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@

-SUBDIRS = lib intl src po man testsuite
+SUBDIRS = lib intl src po
EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests beos-runpiped.c fastcheck.beos

noinst_SCRIPTS = systype
@@ -117,19 +117,16 @@ GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

$(ACLOCAL_M4): configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)

config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)

config.h: stamp-h
@if test ! -f $@; then \
@@ -147,7 +144,6 @@ $(srcdir)/config.h.in: $(srcdir)/stamp-h
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
- cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null

mostlyclean-hdr:
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -141,7 +141,6 @@ all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -111,7 +111,6 @@ GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
@@ -168,8 +167,6 @@ distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu man/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \

0 comments on commit 22fa218

Please sign in to comment.