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 Aug 3, 2023
2 parents 3bcacf8 + f6aa119 commit 0cd152d
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 54 deletions.
18 changes: 18 additions & 0 deletions lang/python/python-certifi/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

case "$1" in
*-src)
;;
python3-certifi)
BUNDLE=$(python3 -m certifi) || {
echo "Failed to run the certfi module script. Exit status=$?." >&2
echo "Output='$BUNDLE'" >&2
exit 1
}
ls -l "$BUNDLE"
;;
*)
echo "Unexpected package '$1'" >&2
exit 1
;;
esac
4 changes: 2 additions & 2 deletions libs/libudev-zero/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libudev-zero
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/illiliti/libudev-zero/tar.gz/$(PKG_VERSION)?
PKG_HASH:=c4cf149ea96295c1e6e86038d10c725344c751982ed4a790b06c76776923e0ea
PKG_HASH:=0bd89b657d62d019598e6c7ed726ff8fed80e8ba092a83b484d66afb80b77da5

PKG_MAINTAINER:=Daniel Golle <[email protected]>
PKG_LICENSE:=MIT
Expand Down
4 changes: 2 additions & 2 deletions net/curl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/nls.mk

PKG_NAME:=curl
PKG_VERSION:=8.1.2
PKG_VERSION:=8.2.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/curl/curl/releases/download/curl-$(subst .,_,$(PKG_VERSION))/ \
https://dl.uxnr.de/mirror/curl/ \
https://curl.askapache.com/download/ \
https://curl.se/download/
PKG_HASH:=31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3999b29d94f4d1e7dbac5ef6
PKG_HASH:=dd322f6bd0a20e6cebdfd388f69e98c3d183bed792cf4713c8a7ef498cba4894

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
Expand Down
2 changes: 1 addition & 1 deletion net/isc-dhcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.3-P1
PKG_RELEASE:=3
PKG_RELEASE:=5

PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
Expand Down
24 changes: 12 additions & 12 deletions net/isc-dhcp/files/dhclient.init
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ pid_file=/var/run/dhclient.pid
script_file=/usr/sbin/dhclient-script

start() {
/usr/sbin/dhclient -q -nw -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`

if [ $? -ne 0 ]; then
return 1
fi
local ifname

. /lib/functions/network.sh

network_get_device ifname "wan" || return 1

/usr/sbin/dhclient -q -nw -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file $ifname

[ $? -eq 0 ] || return 1
}

stop() {
if [ ! -e $pid_file ]; then
return 1
fi
[ -e $pid_file ] || return 1

kill -9 `cat $pid_file`
kill -9 $(cat $pid_file)

if [ $? -ne 0 ]; then
return 1
fi
[ $? -eq 0 ] || return 1

rm $pid_file
}
26 changes: 13 additions & 13 deletions net/isc-dhcp/files/dhclient6.init
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ pid_file=/var/run/dhclient6.pid
script_file=/usr/sbin/dhclient-script

start() {
/usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`

if [ $? -ne 0 ]; then
return 1
fi
local ifname

. /lib/functions/network.sh

network_get_device ifname "wan" || return 1

/usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file $ifname

[ $? -eq 0 ] || return 1
}

stop() {
if [ ! -e $pid_file ]; then
return 1
fi
[ -e $pid_file ] || return 1

kill -9 $(cat $pid_file)

kill -9 `cat $pid_file`
[ $? -eq 0 ] || return 1

if [ $? -ne 0 ]; then
return 1
fi

rm $pid_file
}
41 changes: 23 additions & 18 deletions net/isc-dhcp/files/dhcpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,20 @@ create_empty_zone() {
}

append_routes() {
local tuple tuples="$1"
local string=
local tuple tuple="$(trim "$1")"
local network prefix router save octets compacted

local IFS=','
for tuple in $tuples; do
local network prefix router save octets compacted
save="${tuple% *}"
router="$(trim "${tuple#${save} }")"

tuple="$(trim "$tuple")"
network="$(trim "${save%/[0-9]*}")"

save="${tuple% *}"
router="$(trim "${tuple#${save} }")"
prefix="$(trim "${save##${network}/}")"

network="$(trim "${save%/[0-9]*}")"
octets=$((($prefix + 7) / 8))
compacted="$(echo "$network" | cut -d. -f1-$octets)"

prefix="$(trim "${save##${network}/}")"

octets=$((($prefix + 7) / 8))
compacted="$(echo "$network" | cut -d. -f1-$octets)"

string="${string:+, }$(explode "$prefix${compacted:+.$compacted}.$router")"
done

echo " option classless-ipv4-route $string;"
routes="$routes${routes:+, }$(explode "$prefix${compacted:+.$compacted}.$router")"
}

append_dhcp_options() {
Expand Down Expand Up @@ -306,8 +297,14 @@ static_host_add() {
extra_options="$extra_options${extra_options:+ }0c" ;;
domain-name)
extra_options="$extra_options${extra_options:+ }0f" ;;
renewal-time)
extra_options="$extra_options${extra_options:+ }3a" ;;
rebinding-time)
extra_options="$extra_options${extra_options:+ }3b" ;;
fqdn)
extra_options="$extra_options${extra_options:+ }51" ;;
routes)
extra_options="$extra_options${extra_options:+ }79" ;;
*)
echo "unknown option: $option" >&2 ;;
esac
Expand Down Expand Up @@ -344,7 +341,11 @@ static_host_add() {
if [ -n "$gateway" ] ; then
echo " option routers $gateway;"
fi

local routes=
config_list_foreach "$cfg" "routes" append_routes
[ -n "$routes" ] && echo " option classless-ipv4-route $routes;"

config_list_foreach "$cfg" "dhcp_option" append_dhcp_options
if [ -n "$extra_options" ]; then
echo -e " if exists dhcp-parameter-request-list {\n option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list, $extra_options);\n }"
Expand Down Expand Up @@ -391,7 +392,11 @@ gen_dhcp_subnet() {
echo " option routers $gateway;"
fi
echo " option domain-name-servers $DNS;"

local routes=
config_list_foreach "$cfg" "routes" append_routes
[ -n "$routes" ] && echo " option classless-ipv4-route $routes;"

config_list_foreach "$cfg" "dhcp_option" append_dhcp_options
echo "}"
}
Expand Down
4 changes: 2 additions & 2 deletions net/knot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=knot
PKG_VERSION:=3.2.8
PKG_VERSION:=3.2.9
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
PKG_HASH:=ef419a428f327def77780bc90eda763b51e6121fe548543da84b9eb96a261a6e
PKG_HASH:=bc1f9eb8c9f67f52805f3acfa2d0153190245fa145b007fafa9068d2da292506

PKG_MAINTAINER:=Daniel Salzman <[email protected]>
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
Expand Down
2 changes: 1 addition & 1 deletion utils/collectd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=collectd
PKG_VERSION:=5.12.0
PKG_RELEASE:=43
PKG_RELEASE:=44

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
Expand Down
98 changes: 98 additions & 0 deletions utils/collectd/files/collectd.init
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,100 @@ process_write_http_node() {
printf "\\t</Node>\n" >> "$COLLECTD_CONF"
}

process_mqtt() {
printf "<Plugin mqtt>\n" >> "$COLLECTD_CONF"
config_foreach process_mqtt_block mqtt_block
printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
}

process_mqtt_block() {
local cfg="$1"

local blocktype name Host Port User Password ClientId QoS Prefix Retain StoreRates CleanSession Topic

config_get blocktype "$cfg" blocktype
[ -z "$blocktype" ] && {
$LOG notice "No blocktype option in config $cfg defined"
return 0
}
config_get name "$cfg" name
[ -z "$name" ] && {
$LOG notice "No name option in config $cfg defined"
return 0
}
config_get Host "$cfg" Host
[ -z "$Host" ] && {
$LOG notice "No Host option in config $cfg defined"
return 0
}
config_get Port "$cfg" Port
config_get User "$cfg" User
config_get Password "$cfg" Password
config_get QoS "$cfg" QoS
config_get ClientId "$cfg" ClientId
config_get Prefix "$cfg" Prefix
[ -n "$Prefix" ] && [ "$blocktype" != "Publish" ] && {
$LOG notice "Prefix option in config $cfg defined under non Publish block"
return 0
}
config_get Retain "$cfg" Retain
[ -n "$Retain" ] && [ "$blocktype" != "Publish" ] && {
$LOG notice "Retain option in config $cfg defined under non Publish block"
return 0
}
config_get StoreRates "$cfg" StoreRates
[ -n "$StoreRates" ] && [ "$blocktype" != "Publish" ] && {
$LOG notice "StoreRates option in config $cfg defined under non Publish block"
return 0
}
config_get CleanSession "$cfg" CleanSession
[ -n "$CleanSession" ] && [ "$blocktype" != "Subscribe" ] && {
$LOG notice "CleanSession option in config $cfg defined under non Subscribe block"
return 0
}
config_get Topic "$cfg" Topic
[ -n "$Topic" ] && [ "$blocktype" != "Subscribe" ] && {
$LOG notice "Topic option in config $cfg defined under non Subscribe block"
return 0
}

printf "\\t<%s \"%s\">\n" "${blocktype}" "${name}" >> "$COLLECTD_CONF"
[ -z "$Host" ] || {
printf "\\t\\tHost \"%s\"\n" "${Host}" >> "$COLLECTD_CONF"
}
[ -z "$Port" ] || {
printf "\\t\\tPort \"%s\"\n" "${Port}" >> "$COLLECTD_CONF"
}
[ -z "$User" ] || {
printf "\\t\\tUser \"%s\"\n" "${User}" >> "$COLLECTD_CONF"
}
[ -z "$Password" ] || {
printf "\\t\\tPassword \"%s\"\n" "${Password}" >> "$COLLECTD_CONF"
}
[ -z "$QoS" ] || {
printf "\\t\\tQoS %s\n" "${QoS}" >> "$COLLECTD_CONF"
}
[ -z "$ClientId" ] || {
printf "\\t\\tClientId \"%s\"\n" "${ClientId}" >> "$COLLECTD_CONF"
}
[ -z "$Prefix" ] || {
printf "\\t\\tPrefix \"%s\"\n" "${Prefix}" >> "$COLLECTD_CONF"
}
[ -z "$Retain" ] || {
printf "\\t\\tRetain \"%s\"\n" "${Retain}" >> "$COLLECTD_CONF"
}
[ -z "$StoreRates" ] || {
printf "\\t\\tStoreRates \"%s\"\n" "${StoreRates}" >> "$COLLECTD_CONF"
}
[ -z "$CleanSession" ] || {
printf "\\t\\tCleanSession \"%s\"\n" "${CleanSession}" >> "$COLLECTD_CONF"
}
[ -z "$Topic" ] || {
printf "\\t\\tTopic \"%s\"\n" "${Topic}" >> "$COLLECTD_CONF"
}
printf "\\t</%s>\n" "${blocktype}" >> "$COLLECTD_CONF"
}

process_network() {
local cfg="$1"

Expand Down Expand Up @@ -407,6 +501,10 @@ process_plugins() {
CONFIG_STRING=""
process_write_http
;;
mqtt)
CONFIG_STRING=""
process_mqtt
;;
*)
CONFIG_STRING=""
process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
Expand Down
9 changes: 9 additions & 0 deletions utils/collectd/files/collectd.uci
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,12 @@ config globals 'globals'
#config write_http_node
# option name 'foo'
# option URL 'http://example.org/post-collectd'
#
#config plugin 'mqtt'
# option enable '1'
#
#config mqtt_block
# option name 'foo'
# option blocktype 'Subscribe'
# option Host 'localhost'
# option Topic 'collectd/#'
2 changes: 2 additions & 0 deletions utils/collectd/files/usr/share/collectd/plugin/mqtt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
4 changes: 2 additions & 2 deletions utils/mg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mg
PKG_VERSION:=7.0
PKG_VERSION:=7.3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
PKG_HASH:=c9251d3313663568ac0a571018bc142ef8a533c079e9e9e29bf8088fc0a7d181
PKG_HASH:=60d3de8e989d8827c81aadb6e161e2b8544778e4470149f4e48efef32a18afdc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)

PKG_MAINTAINER:=Hirokazu MORIKAWA <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion utils/mg/patches/001-cross_compile_openwrt.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
# Option variables
if [ ! -z "$PREFIX" ] ; then
prefix="$PREFIX"
@@ -327,80 +254,9 @@ if [ $static -ne 0 ] ; then
@@ -337,80 +264,9 @@ if [ $static -ne 0 ] ; then
ldflags="${ldflags}-static"
fi

Expand Down

0 comments on commit 0cd152d

Please sign in to comment.