socat: update to 1.8.0.0

This commit is contained in:
coolsnowwolf 2024-11-30 01:39:00 +08:00
parent 97ab90bf29
commit 8fee5c51e1
3 changed files with 7 additions and 75 deletions

View File

@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=socat
PKG_VERSION:=1.7.4.4
PKG_RELEASE:=1
PKG_VERSION:=1.8.0.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
PKG_HASH:=fbd42bd2f0e54a3af6d01bdf15385384ab82dbc0e4f1a5e153b3e0be1b6380ac
PKG_HASH:=e1de683dd22ee0e3a6c6bbff269abe18ab0c9d7eb650204f125155b9005faca7
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0-or-later OpenSSL
@ -58,6 +58,9 @@ CONFIGURE_ARGS += \
--disable-readline \
--enable-termios
## procan.c fails to compile when ccache is enabled
MAKE_FLAGS += CC="$(TARGET_CC_NOCACHE)"
ifneq ($(CONFIG_SOCAT_SSL),y)
CONFIGURE_ARGS+= --disable-openssl
endif
@ -84,10 +87,6 @@ CONFIGURE_VARS += \
define Package/socat/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/socat.config $(1)/etc/config/socat
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/socat.init $(1)/etc/init.d/socat
endef
$(eval $(call BuildPackage,socat))
$(eval $(call BuildPackage,socat))

View File

@ -1,6 +0,0 @@
# forward port 8000 on IPv6 to IPv4 host port 80
# change enable to '1' to use this example
config socat 'http'
option enable '0'
option SocatOptions '-d -d TCP6-LISTEN:8000,fork TCP4:192.168.1.20:80'
option user 'nobody'

View File

@ -1,61 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2014 OpenWrt.org
START=99
STOP=99
USE_PROCD=1
PROG=/usr/bin/socat
NAME=socat
validate_section_socat()
{
uci_load_validate socat socat "$1" "$2" \
'enable:bool:1' \
'SocatOptions:or(string, list(string))' \
'user:string:root'
}
append_param_command()
{
procd_append_param command "$1"
}
socat_instance()
{
local is_list
local user
[ "$2" = 0 ] || {
echo "validation failed"
return 1
}
[ "$enable" = "0" ] && return 1
procd_open_instance
procd_set_param command "$PROG"
config_get is_list "$1" SocatOptions_LENGTH
if [ -z "$is_list" ]; then
procd_append_param command $SocatOptions
else
config_list_foreach "$1" SocatOptions append_param_command
fi
config_get user "$1" user
if [ -n "$user" ]; then
procd_set_param user $user
fi
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
start_service () {
config_load "$NAME"
config_foreach validate_section_socat socat socat_instance
}
service_triggers() {
procd_add_reload_trigger "$NAME"
procd_add_validation validate_section_socat
}