mirror of
https://github.com/coolsnowwolf/packages
synced 2025-01-09 04:37:41 +08:00
commit
28ee6e688c
@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright (C) 2014 Bruno Randolf <br1@einfach.org>
|
||||
# Copyright (C) 2019 Yousong Zhou <yszhou4tech@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -9,13 +10,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=exfat-nofuse
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2017-06-20
|
||||
PKG_SOURCE_VERSION:=de4c760bc9a05ead83bc3ec6eec6cf1fb106f523
|
||||
PKG_MIRROR_HASH:=2aa53a83daf4be46e437842ee67d2e0ea327642cb6b8856a79153b52ec726a57
|
||||
PKG_SOURCE_DATE:=2018-04-17
|
||||
PKG_SOURCE_VERSION:=01c30ad52625a7261e1b0d874553b6ca7af25966
|
||||
PKG_MIRROR_HASH:=47e3b6b8384e4beaa07dc762f4e0cce9a067750cbb4b2fb4ba18d2348038c270
|
||||
|
||||
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -0,0 +1,31 @@
|
||||
From c0d3452e0366e2ab4fc51e7981e48636facdf486 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Tue, 8 Jan 2019 15:45:26 +0000
|
||||
Subject: [PATCH 1/2] exfat_oal: use get_seconds() directly
|
||||
|
||||
---
|
||||
exfat_oal.c | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/exfat_oal.c b/exfat_oal.c
|
||||
index 7435442..83f8e4b 100644
|
||||
--- a/exfat_oal.c
|
||||
+++ b/exfat_oal.c
|
||||
@@ -128,16 +128,9 @@ static time_t accum_days_in_year[] = {
|
||||
|
||||
TIMESTAMP_T *tm_current(TIMESTAMP_T *tp)
|
||||
{
|
||||
- struct timespec ts;
|
||||
time_t second, day, leap_day, month, year;
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
|
||||
- ts = CURRENT_TIME_SEC;
|
||||
-#else
|
||||
- ktime_get_real_ts(&ts);
|
||||
-#endif
|
||||
-
|
||||
- second = ts.tv_sec;
|
||||
+ second = get_seconds();
|
||||
second -= sys_tz.tz_minuteswest * SECS_PER_MIN;
|
||||
|
||||
/* Jan 1 GMT 00:00:00 1980. But what about another time zone? */
|
42
kernel/exfat-nofuse/patches/0002-4.18.patch.patch
Normal file
42
kernel/exfat-nofuse/patches/0002-4.18.patch.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 4b9607d6fd4a35d9bb35527fae7aac23d848c0ce Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Tue, 8 Jan 2019 15:45:24 +0000
|
||||
Subject: [PATCH 2/2] 4.18.patch
|
||||
|
||||
Imported from https://aur.archlinux.org/cgit/aur.git/plain/4.18.patch?h=exfat-dkms-git
|
||||
---
|
||||
exfat_super.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/exfat_super.c b/exfat_super.c
|
||||
index 312de36..3ac18b0 100644
|
||||
--- a/exfat_super.c
|
||||
+++ b/exfat_super.c
|
||||
@@ -147,8 +147,13 @@ static time_t accum_days_in_year[] = {
|
||||
static void _exfat_truncate(struct inode *inode, loff_t old_size);
|
||||
|
||||
/* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
|
||||
+void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec64 *ts,
|
||||
+ DATE_TIME_T *tp)
|
||||
+#else
|
||||
void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
|
||||
DATE_TIME_T *tp)
|
||||
+#endif
|
||||
{
|
||||
time_t year = tp->Year;
|
||||
time_t ld;
|
||||
@@ -166,8 +171,13 @@ void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
|
||||
}
|
||||
|
||||
/* Convert linear UNIX date to a FAT time/date pair. */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
|
||||
+void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec64 *ts,
|
||||
+ DATE_TIME_T *tp)
|
||||
+#else
|
||||
void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec *ts,
|
||||
DATE_TIME_T *tp)
|
||||
+#endif
|
||||
{
|
||||
time_t second = ts->tv_sec;
|
||||
time_t day, month, year;
|
47
lang/golang/golang-github-agl-ed25519/Makefile
Normal file
47
lang/golang/golang-github-agl-ed25519/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-github-agl-ed25519
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/agl/ed25519.git
|
||||
PKG_SOURCE_VERSION:=5312a61534124124185d41f09206b9fef1d88403
|
||||
PKG_SOURCE_DATE:=20170117
|
||||
PKG_MIRROR_HASH:=be9e9223e7a15f4c12d9f652f5a50a59c01fd1f87ee73bea0ebfd661b5a7ca9c
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=github.com/agl/ed25519
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-github-agl-ed25519-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Ed25519 signature algorithm for Go
|
||||
URL:=https://github.com/agl/ed25519
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
||||
+golang-golang-x-crypto-dev
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-github-agl-ed25519-dev/description
|
||||
Ed25519 is a public-key signature system based on elliptic-curve
|
||||
cryptography.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-github-agl-ed25519-dev))
|
||||
$(eval $(call BuildPackage,golang-github-agl-ed25519-dev))
|
46
lang/golang/golang-github-dchest-siphash/Makefile
Normal file
46
lang/golang/golang-github-dchest-siphash/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-github-dchest-siphash
|
||||
PKG_VERSION:=1.2.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/dchest/siphash/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=90c5e8ba62b64b2f76ed58c87dd50456171610049bef51fd71bc593c1744fad2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/siphash-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
PKG_LICENSE:=CC0-1.0
|
||||
PKG_LICENSE_FILES:=README.md
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=github.com/dchest/siphash
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-github-dchest-siphash-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Go implementation of SipHash-2-4
|
||||
URL:=https://github.com/dchest/siphash
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-github-dchest-siphash-dev/description
|
||||
SipHash-2-4 is a pseudorandom function (a.k.a. keyed hash function)
|
||||
optimized for speed on short messages.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-github-dchest-siphash-dev))
|
||||
$(eval $(call BuildPackage,golang-github-dchest-siphash-dev))
|
47
lang/golang/golang-golang-x-crypto/Makefile
Normal file
47
lang/golang/golang-golang-x-crypto/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-golang-x-crypto
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/golang/crypto.git
|
||||
PKG_SOURCE_VERSION:=a49355c7e3f8fe157a85be2f77e6e269a0f89602
|
||||
PKG_SOURCE_DATE:=20180620
|
||||
PKG_MIRROR_HASH:=80b16b203736ac56883d0610edbc5981eb78f15b7b35d11b5ca639f7c3814214
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=golang.org/x/crypto
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-golang-x-crypto-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Go supplementary cryptography libraries
|
||||
URL:=https://godoc.org/golang.org/x/crypto
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
||||
+golang-golang-x-net-dev \
|
||||
+golang-golang-x-sys-dev
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-golang-x-crypto-dev/description
|
||||
Supplementary Go cryptography libraries.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-golang-x-crypto-dev))
|
||||
$(eval $(call BuildPackage,golang-golang-x-crypto-dev))
|
58
lang/golang/golang-golang-x-net/Makefile
Normal file
58
lang/golang/golang-golang-x-net/Makefile
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-golang-x-net
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/golang/net.git
|
||||
PKG_SOURCE_VERSION:=afe8f62b1d6bbd81f31868121a50b06d8188e1f9
|
||||
PKG_SOURCE_DATE:=20180620
|
||||
PKG_MIRROR_HASH:=9a8bb3bf21ea60121d7e87f1bd1af9effbdcd908f758be99457653172d13eb1e
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=golang.org/x/net
|
||||
# exclude http2/h2i to break circular dependency with golang-golang-x-crypto-dev
|
||||
# since there are no other binaries, can skip compilation
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-golang-x-net-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Go supplementary network libraries
|
||||
URL:=https://godoc.org/golang.org/x/net
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +golang-golang-x-text-dev
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-golang-x-net-dev/description
|
||||
Supplementary Go networking libraries.
|
||||
endef
|
||||
|
||||
# http2/testdata/draft-ietf-httpbis-http2.xml is a non-free document
|
||||
# http2/z_spec_test.go uses http2/testdata/draft-ietf-httpbis-http2.xml
|
||||
define Package/golang-golang-x-net-dev/install
|
||||
$(call GoPackage/Package/Install/Src,$(1))
|
||||
|
||||
rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/draft-ietf-httpbis-http2.xml
|
||||
rmdir $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/
|
||||
|
||||
rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/z_spec_test.go
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-golang-x-net-dev))
|
||||
$(eval $(call BuildPackage,golang-golang-x-net-dev))
|
46
lang/golang/golang-golang-x-sys/Makefile
Normal file
46
lang/golang/golang-golang-x-sys/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-golang-x-sys
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/golang/sys.git
|
||||
PKG_SOURCE_VERSION:=63fc586f45fe72d95d5240a5d5eb95e6503907d3
|
||||
PKG_SOURCE_DATE:=20180621
|
||||
PKG_MIRROR_HASH:=3afe7936fb9fb291ef9b9cfa88f51576cdc19abbd34240232ce284958ac7dbaf
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=golang.org/x/sys
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-golang-x-sys-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Go packages for interaction with the OS
|
||||
URL:=https://godoc.org/golang.org/x/sys
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-golang-x-sys-dev/description
|
||||
Supplementary Go packages for low-level interactions with the operating
|
||||
system.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-golang-x-sys-dev))
|
||||
$(eval $(call BuildPackage,golang-golang-x-sys-dev))
|
47
lang/golang/golang-golang-x-text/Makefile
Normal file
47
lang/golang/golang-golang-x-text/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-golang-x-text
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/golang/text.git
|
||||
PKG_SOURCE_VERSION:=5cec4b58c438bd98288aeb248bab2c1840713d21
|
||||
PKG_SOURCE_DATE:=20180520
|
||||
PKG_MIRROR_HASH:=6c541a59f32f57afa54a2216045ddf16a077f8fe2e823fbbe77723eca04ddddb
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=golang.org/x/text
|
||||
# exclude gotext (and message/pipeline) to avoid dependency on golang.org/x/tools
|
||||
# since there are no other binaries, can skip compilation
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-golang-x-text-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Go text processing support
|
||||
URL:=https://godoc.org/golang.org/x/text
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-golang-x-text-dev/description
|
||||
Supplementary Go libraries for text processing, many involving Unicode.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-golang-x-text-dev))
|
||||
$(eval $(call BuildPackage,golang-golang-x-text-dev))
|
@ -28,10 +28,12 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
|
||||
# files are installed:
|
||||
#
|
||||
# * Files with one of these extensions:
|
||||
# .go, .c, .cc, .h, .hh, .proto, .s
|
||||
# .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s
|
||||
#
|
||||
# * Files in any 'testdata' directory
|
||||
#
|
||||
# * go.mod and go.sum, in any directory
|
||||
#
|
||||
# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
|
||||
#
|
||||
#
|
||||
@ -74,10 +76,32 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
|
||||
# not necessary.
|
||||
#
|
||||
# e.g. GO_PKG_GO_GENERATE:=1
|
||||
#
|
||||
#
|
||||
# GO_PKG_GCFLAGS - list of arguments, default empty
|
||||
#
|
||||
# Additional go tool compile arguments to use when building targets.
|
||||
#
|
||||
# e.g. GO_PKG_GCFLAGS:=-N -l
|
||||
#
|
||||
#
|
||||
# GO_PKG_LDFLAGS - list of arguments, default empty
|
||||
#
|
||||
# Additional go tool link arguments to use when building targets.
|
||||
#
|
||||
# e.g. GO_PKG_LDFLAGS:=-s -w
|
||||
#
|
||||
#
|
||||
# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty
|
||||
#
|
||||
# Each definition will be passed as the parameter to the -X go tool
|
||||
# link argument, i.e. -ldflags "-X importpath.name=value"
|
||||
#
|
||||
# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH)
|
||||
|
||||
# Credit for this package build process (GoPackage/Build/Configure and
|
||||
# GoPackage/Build/Compile) belong to Debian's dh-golang completely.
|
||||
# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git
|
||||
# https://salsa.debian.org/go-team/packages/dh-golang
|
||||
|
||||
|
||||
# for building packages, not user code
|
||||
@ -129,6 +153,7 @@ define GoPackage/Environment
|
||||
GO386=$(GO_386) \
|
||||
GOARM=$(GO_ARM) \
|
||||
GOMIPS=$(GO_MIPS) \
|
||||
GOMIPS64=$(GO_MIPS64) \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \
|
||||
CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
@ -152,17 +177,20 @@ define GoPackage/Build/Configure
|
||||
sed 's|^\./||') ; \
|
||||
\
|
||||
if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \
|
||||
code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \
|
||||
code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$$$$') ; \
|
||||
testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \
|
||||
gomod=$$$$(echo "$$$$files" | grep '\(^\|/\)go\.\(mod\|sum\)$$$$') ; \
|
||||
\
|
||||
for pattern in $(GO_PKG_INSTALL_EXTRA); do \
|
||||
extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \
|
||||
done ; \
|
||||
\
|
||||
files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \
|
||||
files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$gomod"; echo "$$$$extra") ; \
|
||||
files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \
|
||||
fi ; \
|
||||
\
|
||||
IFS=$$$$'\n' ; \
|
||||
\
|
||||
echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \
|
||||
for file in $$$$files; do \
|
||||
echo $$$$file ; \
|
||||
@ -170,6 +198,7 @@ define GoPackage/Build/Configure
|
||||
mkdir -p $$$$(dirname $$$$dest) ; \
|
||||
$(CP) $$$$file $$$$dest ; \
|
||||
done ; \
|
||||
echo ; \
|
||||
\
|
||||
link_contents() { \
|
||||
local src=$$$$1 ; \
|
||||
@ -208,6 +237,7 @@ define GoPackage/Build/Configure
|
||||
else \
|
||||
echo "Not building binaries, skipping symlinks" ; \
|
||||
fi ; \
|
||||
echo ; \
|
||||
)
|
||||
endef
|
||||
|
||||
@ -223,35 +253,54 @@ define GoPackage/Build/Compile
|
||||
CXX=$(TARGET_CXX) \
|
||||
$(call GoPackage/Environment) ; \
|
||||
\
|
||||
echo "Finding targets" ; \
|
||||
targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \
|
||||
for pattern in $(GO_PKG_EXCLUDES); do \
|
||||
targets=$$$$(echo "$$$$targets" | grep -v "$$$$pattern") ; \
|
||||
done ; \
|
||||
echo ; \
|
||||
\
|
||||
if [ "$(GO_PKG_GO_GENERATE)" = 1 ]; then \
|
||||
echo "Calling go generate" ; \
|
||||
go generate -v $(1) $$$$targets ; \
|
||||
echo ; \
|
||||
fi ; \
|
||||
\
|
||||
if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
|
||||
echo "Building targets" ; \
|
||||
case $(GO_ARCH) in \
|
||||
arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
|
||||
mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
|
||||
arm) installsuffix="v$(GO_ARM)" ;; \
|
||||
mips|mipsle) installsuffix="$(GO_MIPS)" ;; \
|
||||
mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
|
||||
esac ; \
|
||||
trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
|
||||
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
|
||||
pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
|
||||
pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
|
||||
for def in $(GO_PKG_LDFLAGS_X); do \
|
||||
pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \
|
||||
done ; \
|
||||
go install \
|
||||
$$$$installsuffix \
|
||||
$$$${installsuffix:+-installsuffix $$$$installsuffix} \
|
||||
-gcflags "$$$$trimpath" \
|
||||
-asmflags "$$$$trimpath" \
|
||||
-ldflags "$$$$ldflags" \
|
||||
-v \
|
||||
$$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
|
||||
$$$${pkg_ldflags:+-ldflags "$$$$pkg_ldflags"} \
|
||||
$(1) \
|
||||
$$$$targets ; \
|
||||
retval=$$$$? ; \
|
||||
echo ; \
|
||||
\
|
||||
if [ "$$$$retval" -eq 0 ] && [ -z "$(call GoPackage/has_binaries)" ]; then \
|
||||
echo "No binaries were generated, consider adding GO_PKG_SOURCE_ONLY:=1 to Makefile" ; \
|
||||
echo ; \
|
||||
fi ; \
|
||||
\
|
||||
echo "Cleaning module download cache (golang/go#27455)" ; \
|
||||
go clean -modcache ; \
|
||||
echo ; \
|
||||
fi ; \
|
||||
exit $$$$retval ; \
|
||||
)
|
||||
|
@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (C) 2018 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=golang-torproject-pluggable-transports-goptlib
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/goptlib.git
|
||||
PKG_SOURCE_VERSION:=7d56ec4f381e8b1aedfda360594e35a5731b5337
|
||||
PKG_SOURCE_DATE:=20180320
|
||||
PKG_MIRROR_HASH:=ec28d8882e031046efd561764e1b9119376844a1c3d4941e038cfbe32e60b058
|
||||
|
||||
PKG_LICENSE:=CC0-1.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
GO_PKG:=git.torproject.org/pluggable-transports/goptlib.git
|
||||
GO_PKG_SOURCE_ONLY:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../golang-package.mk
|
||||
|
||||
define Package/golang-torproject-pluggable-transports-goptlib-dev
|
||||
$(call GoPackage/GoSubMenu)
|
||||
TITLE:=Tor pluggable transports library for Go
|
||||
URL:=https://gitweb.torproject.org/pluggable-transports/goptlib.git/
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/golang-torproject-pluggable-transports-goptlib-dev/description
|
||||
goptlib is a library for writing Tor pluggable transports in Go.
|
||||
endef
|
||||
|
||||
$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-goptlib-dev))
|
||||
$(eval $(call BuildPackage,golang-torproject-pluggable-transports-goptlib-dev))
|
@ -13,14 +13,16 @@ include $(GO_INCLUDE_DIR)/golang-version.mk
|
||||
|
||||
|
||||
unexport \
|
||||
GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
|
||||
GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
|
||||
GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
|
||||
CGO_ENABLED \
|
||||
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
|
||||
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
|
||||
CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \
|
||||
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
|
||||
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
|
||||
GOARM GO386 GOMIPS \
|
||||
GOARM GO386 GOMIPS GOMIPS64 \
|
||||
GO111MODULE \
|
||||
GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
|
||||
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
|
||||
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
|
||||
@ -57,15 +59,15 @@ GO_ARM:=$(if $(CONFIG_arm_v7),7,$(if $(CONFIG_arm_v6),6,$(if $(findstring $(GO_A
|
||||
|
||||
GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),)
|
||||
|
||||
GO_MIPS64:=$(if $(filter $(GO_ARCH),mips64 mips64le),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),)
|
||||
|
||||
# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors
|
||||
# -mips32r2: conflicts with -march=mips32 set by go
|
||||
GO_CFLAGS_TO_REMOVE:=$(if \
|
||||
$(filter $(GO_ARCH),386),-fno-plt,$(if \
|
||||
$(filter $(GO_ARCH),mips mipsle),-mips32r2,))
|
||||
|
||||
# mips64 / mips64el doesn't have softfloat support yet
|
||||
# https://github.com/golang/go/issues/14635
|
||||
GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||powerpc64||x86_64)
|
||||
GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64)
|
||||
|
||||
GO_TARGET_PREFIX:=/usr
|
||||
GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR)
|
||||
|
@ -10,5 +10,5 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined)
|
||||
endif
|
||||
|
||||
|
||||
GO_VERSION_MAJOR_MINOR:=1.10
|
||||
GO_VERSION_PATCH:=3
|
||||
GO_VERSION_MAJOR_MINOR:=1.12
|
||||
GO_VERSION_PATCH:=1
|
||||
|
@ -10,7 +10,7 @@ include ../golang-version.mk
|
||||
|
||||
PKG_NAME:=golang
|
||||
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
GO_SOURCE_URLS:=https://dl.google.com/go/ \
|
||||
https://mirrors.ustc.edu.cn/golang/ \
|
||||
@ -18,7 +18,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:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2
|
||||
PKG_HASH:=0be127684df4b842a64e58093154f9d15422f1405f1fcff4b2c36ffc6a15818a
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -180,6 +180,8 @@ endef
|
||||
# when go compiles a program, it will use the host std lib
|
||||
# so remove it now and force go to rebuild std for target later
|
||||
define Host/Install
|
||||
$(call Host/Uninstall)
|
||||
|
||||
$(call GoCompiler/Host/Install/Bin,)
|
||||
$(call GoCompiler/Host/Install/Src,)
|
||||
|
||||
|
@ -8,16 +8,18 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=avahi
|
||||
PKG_VERSION:=0.6.32
|
||||
PKG_VERSION:=0.7
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454
|
||||
PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
|
||||
https://avahi.org/download
|
||||
PKG_HASH:=57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804
|
||||
|
||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
||||
PKG_CPE_ID:=cpe:/a:avahi:avahi
|
||||
|
||||
PKG_BUILD_DEPENDS:=intltool/host
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_REMOVE_FILES:=autogen.sh
|
||||
|
||||
@ -271,8 +273,6 @@ CONFIGURE_ARGS+= \
|
||||
--disable-dbm \
|
||||
--enable-gdbm \
|
||||
--enable-libdaemon \
|
||||
$(and $(CONFIG_PACKAGE_libavahi-compat-libdnssd),ifeq ($(BUILD_VARIANT),dbus),\
|
||||
--enable-compat-libdns_sd) \
|
||||
--disable-python \
|
||||
--disable-pygtk \
|
||||
--disable-python-dbus \
|
||||
@ -301,6 +301,10 @@ CONFIGURE_ARGS+= \
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),dbus)
|
||||
ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-compat-libdns_sd
|
||||
endif
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-dbus
|
||||
else
|
||||
@ -346,7 +350,7 @@ endef
|
||||
|
||||
define Package/libavahi-compat-libdnssd/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/avahi-utils/install
|
||||
|
@ -1,3 +1,5 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 8234d69..156d4c4 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -75,8 +75,7 @@ SUBDIRS = \
|
||||
@ -10,6 +12,8 @@
|
||||
|
||||
DX_INPUT = \
|
||||
$(srcdir)/avahi-common/address.h \
|
||||
diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am
|
||||
index 5fc4b25..4c39d3d 100644
|
||||
--- a/avahi-python/avahi-discover/Makefile.am
|
||||
+++ b/avahi-python/avahi-discover/Makefile.am
|
||||
@@ -38,7 +38,6 @@ if HAVE_GDBM
|
||||
@ -28,9 +32,11 @@
|
||||
avahi_discover_PYTHON += __init__.py
|
||||
endif
|
||||
|
||||
diff --git a/avahi-ui/Makefile.am b/avahi-ui/Makefile.am
|
||||
index 238d43a..65a147a 100644
|
||||
--- a/avahi-ui/Makefile.am
|
||||
+++ b/avahi-ui/Makefile.am
|
||||
@@ -78,7 +78,6 @@ endif
|
||||
@@ -80,7 +80,6 @@ endif
|
||||
|
||||
bin_PROGRAMS = bssh
|
||||
desktop_DATA += bssh.desktop bvnc.desktop
|
||||
@ -38,16 +44,18 @@
|
||||
|
||||
bssh_SOURCES = bssh.c
|
||||
|
||||
@@ -106,6 +105,4 @@ endif # HAVE_GLIB
|
||||
@@ -108,6 +107,4 @@ endif # HAVE_GLIB
|
||||
endif
|
||||
endif
|
||||
|
||||
-@INTLTOOL_DESKTOP_RULE@
|
||||
-
|
||||
CLEANFILES = $(desktop_DATA) $(desktop_DATA_in)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6678971..00dac6e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.6.29],[avahi (at) lis
|
||||
@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.7],[avahi (at) lists (dot) freedesktop (dot) org])
|
||||
AC_CONFIG_SRCDIR([avahi-core/server.c])
|
||||
AC_CONFIG_MACRO_DIR([common])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@ -65,7 +73,7 @@
|
||||
AC_CHECK_PROG([STOW], [stow], [yes], [no])
|
||||
|
||||
AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
|
||||
@@ -412,12 +410,6 @@ if test "x$have_kqueue" = "xyes" ; then
|
||||
@@ -413,12 +411,6 @@ if test "x$have_kqueue" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage])
|
||||
fi
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
|
||||
index 8df18dd..08d8090 100644
|
||||
--- a/avahi-common/simple-watch.c
|
||||
+++ b/avahi-common/simple-watch.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
diff --git a/avahi-common/simple-watch.h b/avahi-common/simple-watch.h
|
||||
index 72c1905..db87122 100644
|
||||
--- a/avahi-common/simple-watch.h
|
||||
+++ b/avahi-common/simple-watch.h
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/** \file simple-watch.h Simple poll() based main loop implementation */
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <avahi-common/cdecl.h>
|
||||
#include <avahi-common/watch.h>
|
||||
|
||||
diff --git a/avahi-common/thread-watch.c b/avahi-common/thread-watch.c
|
||||
index c0cadeb..ecb202b 100644
|
||||
--- a/avahi-common/thread-watch.c
|
||||
+++ b/avahi-common/thread-watch.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
diff --git a/avahi-common/thread-watch.h b/avahi-common/thread-watch.h
|
||||
index dec0cf3..1b44ccb 100644
|
||||
--- a/avahi-common/thread-watch.h
|
||||
+++ b/avahi-common/thread-watch.h
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/** \file thread-watch.h Threaded poll() based main loop implementation */
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <avahi-common/cdecl.h>
|
||||
#include <avahi-common/watch.h>
|
||||
|
||||
diff --git a/avahi-common/watch.h b/avahi-common/watch.h
|
||||
index 86e63d3..eea12ec 100644
|
||||
--- a/avahi-common/watch.h
|
||||
+++ b/avahi-common/watch.h
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/** \file watch.h Simplistic main loop abstraction */
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <avahi-common/cdecl.h>
|
@ -0,0 +1,26 @@
|
||||
From ef0ea001f6dd13d6a2e0bc17d13f595d2829f8a8 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremiah McConnell <miah@miah.com>
|
||||
Date: Fri, 15 Jun 2018 11:31:10 -0600
|
||||
Subject: [PATCH] move runtime_dir to /var/run
|
||||
|
||||
Upstream transitioned to using /run as runtime_dir for 0.7. Revert
|
||||
that change for procd compatibility.
|
||||
|
||||
Signed-off-by: Jeremiah McConnell <miah@miah.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 72d61478..8f6e9768 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -984,7 +984,7 @@ AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_GROUP,"$AVAHI_AUTOIPD_GROUP", [Group for runnin
|
||||
#
|
||||
# Avahi runtime dir
|
||||
#
|
||||
-avahi_runtime_dir="/run"
|
||||
+avahi_runtime_dir="${localstatedir}/run"
|
||||
avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
|
||||
AC_SUBST(avahi_runtime_dir)
|
||||
AC_SUBST(avahi_socket)
|
@ -8,15 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libcap
|
||||
PKG_VERSION:=2.25
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2.26
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
|
||||
PKG_HASH:=693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162
|
||||
PKG_HASH:=b630b7c484271b3ba867680d6a14b10a86cfa67247a14631b14c06731d5a458b
|
||||
|
||||
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=License
|
||||
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@ -27,7 +28,7 @@ define Package/libcap
|
||||
TITLE:=Linux capabilities library
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
URL:=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
|
||||
URL:=https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
|
||||
endef
|
||||
|
||||
define Package/libcap/config
|
||||
|
@ -9,10 +9,10 @@
|
||||
+#endif
|
||||
#define MAX_GROUPS 100 /* max number of supplementary groups for user */
|
||||
|
||||
static const cap_value_t raise_setpcap[1] = { CAP_SETPCAP };
|
||||
@@ -557,10 +560,10 @@ int main(int argc, char *argv[], char *envp[])
|
||||
}
|
||||
printf("\n");
|
||||
static char *binary(unsigned long value)
|
||||
@@ -692,10 +695,10 @@ int main(int argc, char *argv[], char *envp[])
|
||||
} else if (!strcmp("--print", argv[i])) {
|
||||
arg_print();
|
||||
} else if ((!strcmp("--", argv[i])) || (!strcmp("==", argv[i]))) {
|
||||
- argv[i] = strdup(argv[i][0] == '-' ? "/bin/bash" : argv[0]);
|
||||
+ argv[i] = strdup(argv[i][0] == '-' ? SHELL : argv[0]);
|
||||
@ -23,7 +23,7 @@
|
||||
exit(1);
|
||||
} else {
|
||||
usage:
|
||||
@@ -582,7 +585,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
@@ -720,7 +723,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
" --killit=<n> send signal(n) to child\n"
|
||||
" --forkfor=<n> fork and make child sleep for <n> sec\n"
|
||||
" == re-exec(capsh) with args as for --\n"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2012-2017 OpenWrt.org
|
||||
# Copyright (C) 2012-2018 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -7,13 +7,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=aria2
|
||||
PKG_VERSION:=1.33.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.34.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
|
||||
PKG_HASH:=996e3fc2fd07ce2dd517e20a1f79b8b3dbaa5c7e27953b5fc19dae38f3874b8c
|
||||
PKG_HASH:=3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
|
||||
Hsing-Wang Liao <kuoruan@gmail.com>
|
||||
@ -80,6 +81,9 @@ CONFIGURE_ARGS += \
|
||||
--without-libuv \
|
||||
--with-libz
|
||||
|
||||
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto
|
||||
|
||||
define Package/aria2/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin
|
||||
|
@ -224,7 +224,7 @@ aria2_start() {
|
||||
append_setting "rpc-secret=${rpc_secret}"
|
||||
elif [ -n "$rpc_user" ]; then
|
||||
append_setting "rpc-user=${rpc_user}"
|
||||
append_setting "rcp-passwd=${rcp-passwd}"
|
||||
append_setting "rpc-passwd=${rpc_passwd}"
|
||||
else
|
||||
_info "It is recommand to set RPC secret."
|
||||
fi
|
||||
@ -235,9 +235,9 @@ aria2_start() {
|
||||
unset_auth_method
|
||||
fi
|
||||
elif [ "$rpc_auth_method" = "user_pass" ]; then
|
||||
if [ -n "$rcp_user" ]; then
|
||||
if [ -n "$rpc_user" ]; then
|
||||
append_setting "rpc-user=${rpc_user}"
|
||||
append_setting "rcp-passwd=${rcp-passwd}"
|
||||
append_setting "rpc-passwd=${rpc_passwd}"
|
||||
else
|
||||
_info "Please set RPC user."
|
||||
unset_auth_method
|
||||
@ -252,6 +252,8 @@ aria2_start() {
|
||||
if [ ."$check_certificate" = ."true" ]; then
|
||||
append_setting "check-certificate=true"
|
||||
append_options "ca_certificate"
|
||||
elif [ ."$check_certificate" = ."false" ]; then
|
||||
append_setting "check-certificate=false"
|
||||
fi
|
||||
|
||||
if [ ."$enable_dht" = ."true" ]; then
|
||||
@ -310,9 +312,9 @@ aria2_start() {
|
||||
|
||||
if [ -n "$user" ]; then
|
||||
if ( user_exists "$user" && _change_owner "$user" "$config_dir" "$log" ); then
|
||||
_info "Aria2 will run with uer '${user}'."
|
||||
_info "Aria2 will run with user '${user}'."
|
||||
if [ "$user" != "root" ]; then
|
||||
_info "Please make sure user '${user}' has write access to downlod dir: ${dir}"
|
||||
_info "Please make sure user '${user}' has write access to download dir: ${dir}"
|
||||
fi
|
||||
else
|
||||
_info "Set run user to '${user}' failed, default user will be used."
|
||||
|
@ -8,18 +8,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=miniupnpd
|
||||
PKG_VERSION:=2.1
|
||||
PKG_VERSION:=2.0.20170421
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=950894779661197fe093855fda29a728f434b5756eb4fa6cb5f7b9bff7ffe0c1
|
||||
PKG_HASH:=9677aeccadf73b4bf8bb9d832c32b5da8266b4d58eed888f3fd43d7656405643
|
||||
|
||||
PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
PKG_MAINTAINER:=Markus Stenberg <fingon@iki.fi>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
define Package/miniupnpd
|
||||
SECTION:=net
|
||||
@ -30,38 +29,51 @@ define Package/miniupnpd
|
||||
URL:=http://miniupnp.free.fr/
|
||||
endef
|
||||
|
||||
define Package/miniupnpd/config
|
||||
config MINIUPNPD_IGDv2
|
||||
bool
|
||||
default n
|
||||
prompt "Enable IGDv2"
|
||||
endef
|
||||
|
||||
define Package/miniupnpd/conffiles
|
||||
/etc/config/upnpd
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
|
||||
define Package/miniupnpd/postinst
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$$IPKG_INSTROOT" ]; then
|
||||
( . /etc/uci-defaults/99-miniupnpd )
|
||||
rm -f /etc/uci-defaults/99-miniupnpd
|
||||
fi
|
||||
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
echo "OpenWrt" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -flto -Wl,--gc-sections
|
||||
MAKE_FLAGS += \
|
||||
TARGET_OPENWRT=1 TEST=0 LIBS="" \
|
||||
CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
|
||||
$(if $(CONFIG_IPV6),-lip6tc)" \
|
||||
CONFIG_OPTIONS="--portinuse --leasefile --igd2 \
|
||||
$(if $(CONFIG_IPV6),--ipv6)" \
|
||||
-f Makefile.linux miniupnpd
|
||||
TARGET_OPENWRT=1 TEST=0 \
|
||||
LIBS="" \
|
||||
CC="$(TARGET_CC) -DIPTABLES_143 \
|
||||
-lip4tc -luuid" \
|
||||
CONFIG_OPTIONS="--portinuse --leasefile \
|
||||
$(if $(CONFIG_MINIUPNPD_IGDv2),--igd2)" \
|
||||
-f Makefile.linux \
|
||||
miniupnpd
|
||||
|
||||
|
||||
define Package/miniupnpd/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/usr/share/miniupnpd
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/hotplug.d/iface $(1)/usr/share/miniupnpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd
|
||||
$(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
|
||||
$(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
|
||||
$(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
|
||||
$(INSTALL_BIN) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
|
||||
$(INSTALL_DATA) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
|
||||
$(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
|
||||
endef
|
||||
|
||||
|
@ -1,44 +1,31 @@
|
||||
#!/bin/sh
|
||||
# miniupnpd integration for firewall3
|
||||
|
||||
IPTABLES=/usr/sbin/iptables
|
||||
IP6TABLES=/usr/sbin/ip6tables
|
||||
|
||||
$IPTABLES -t filter -N MINIUPNPD 2>/dev/null
|
||||
$IPTABLES -t nat -N MINIUPNPD 2>/dev/null
|
||||
$IPTABLES -t nat -N MINIUPNPD-POSTROUTING 2>/dev/null
|
||||
iptables -t filter -N MINIUPNPD 2>/dev/null
|
||||
iptables -t nat -N MINIUPNPD 2>/dev/null
|
||||
iptables -t nat -N MINIUPNPD-POSTROUTING 2>/dev/null
|
||||
|
||||
[ -x $IP6TABLES ] && $IP6TABLES -t filter -N MINIUPNPD 2>/dev/null
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
# helper to insert in chain as penultimate
|
||||
iptables_prepend_rule() {
|
||||
local iptables="$1"
|
||||
local table="$2"
|
||||
local chain="$3"
|
||||
local target="$4"
|
||||
|
||||
$iptables -t "$table" -I "$chain" $($iptables -t "$table" --line-numbers -nL "$chain" | \
|
||||
sed -ne '$s/[^0-9].*//p') -j "$target"
|
||||
}
|
||||
|
||||
ADDED=0
|
||||
|
||||
add_extzone_rules() {
|
||||
local ext_zone="$1"
|
||||
local ext_zone=$1
|
||||
|
||||
[ -z "$ext_zone" ] && return
|
||||
|
||||
# IPv4 - due to NAT, need to add both to nat and filter table
|
||||
# need to insert as penultimate rule for forward & postrouting since final rule might be a fw3 REJECT
|
||||
iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
|
||||
$IPTABLES -t nat -A "zone_${ext_zone}_prerouting" -j MINIUPNPD
|
||||
iptables_prepend_rule "$IPTABLES" nat "zone_${ext_zone}_postrouting" MINIUPNPD-POSTROUTING
|
||||
iptables -t filter -I zone_${ext_zone}_forward -j MINIUPNPD
|
||||
iptables -t nat -I zone_${ext_zone}_prerouting -j MINIUPNPD
|
||||
iptables -t nat -I zone_${ext_zone}_postrouting -j MINIUPNPD-POSTROUTING
|
||||
|
||||
# IPv6 if available - filter only
|
||||
[ -x $IP6TABLES ] && {
|
||||
iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
|
||||
$IP6TABLES -t filter -I zone_${ext_zone}_forward -j MINIUPNPD
|
||||
}
|
||||
ADDED=$(($ADDED + 1))
|
||||
}
|
||||
@ -51,7 +38,8 @@ done
|
||||
|
||||
add_extzone_rules $(uci -q get upnpd.config.external_zone)
|
||||
|
||||
[ "$ADDED" -ne 0 ] && exit 0
|
||||
[ ! $ADDED = 0 ] && exit 0
|
||||
|
||||
|
||||
# If really nothing is available, resort to network_find_wan{,6} and
|
||||
# assume external interfaces all have same firewall zone.
|
||||
|
@ -11,7 +11,7 @@
|
||||
# - check only on ifup (otherwise lease updates etc would cause
|
||||
# miniupnpd state loss)
|
||||
|
||||
[ "$ACTION" != "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0
|
||||
[ ! "$ACTION" = "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0
|
||||
|
||||
tmpconf="/var/etc/miniupnpd.conf"
|
||||
extiface=$(uci get upnpd.config.external_iface)
|
||||
@ -19,6 +19,12 @@ extzone=$(uci get upnpd.config.external_zone)
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
for iface in $(uci get upnpd.config.internal_iface); do
|
||||
network_get_device device $iface
|
||||
[ "$DEVICE" = "$device" ] && /etc/init.d/miniupnpd restart && exit 0
|
||||
done
|
||||
|
||||
|
||||
if [ -z "$extiface" ] ; then
|
||||
# manual external zone (if dynamically find interfaces
|
||||
# belonging to it) overrides network_find_wan*
|
||||
@ -29,5 +35,5 @@ if [ -z "$extiface" ] ; then
|
||||
[ -n "$extiface" ] || network_find_wan6 extiface
|
||||
fi
|
||||
|
||||
[ -n "$ifname" ] || network_get_device ifname "$extiface"
|
||||
grep -q "ext_ifname=$ifname" "$tmpconf" || /etc/init.d/miniupnpd restart
|
||||
[ -n "$ifname" ] || network_get_device ifname ${extiface}
|
||||
grep -q "ext_ifname=$ifname" $tmpconf || /etc/init.d/miniupnpd restart
|
||||
|
@ -7,19 +7,19 @@ STOP=15
|
||||
SERVICE_USE_PID=1
|
||||
|
||||
upnpd_get_port_range() {
|
||||
local var="$1"; shift
|
||||
local val
|
||||
local _var="$1"; shift
|
||||
local _val
|
||||
|
||||
config_get val "$@"
|
||||
config_get _val "$@"
|
||||
|
||||
case "$val" in
|
||||
case "$_val" in
|
||||
[0-9]*[:-][0-9]*)
|
||||
export -n -- "${var}_start=${val%%[:-]*}"
|
||||
export -n -- "${var}_end=${val##*[:-]}"
|
||||
export -n -- "${_var}_start=${_val%%[:-]*}"
|
||||
export -n -- "${_var}_end=${_val##*[:-]}"
|
||||
;;
|
||||
[0-9]*)
|
||||
export -n -- "${var}_start=$val"
|
||||
export -n -- "${var}_end="
|
||||
export -n -- "${_var}_start=$_val"
|
||||
export -n -- "${_var}_end="
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -28,31 +28,33 @@ conf_rule_add() {
|
||||
local cfg="$1"
|
||||
local tmpconf="$2"
|
||||
local action external_port_start external_port_end int_addr
|
||||
local internal_port_start internal_port_end comment
|
||||
local internal_port_start internal_port_end
|
||||
|
||||
config_get action "$cfg" action "deny" # allow or deny
|
||||
config_get action "$cfg" action "deny" # allow or deny
|
||||
upnpd_get_port_range "ext" "$cfg" ext_ports "0-65535" # external ports: x, x-y, x:y
|
||||
config_get int_addr "$cfg" int_addr "0.0.0.0/0" # ip or network and subnet mask (internal)
|
||||
upnpd_get_port_range "int" "$cfg" int_ports "0-65535" # internal ports: x, x-y, x:y or range
|
||||
config_get comment "$cfg" comment "ACL" # comment
|
||||
|
||||
# Make a single IP IP/32 so that miniupnpd.conf can use it.
|
||||
[ "${int_addr%/*}" = "$int_addr" ] && int_addr="$int_addr/32"
|
||||
case "$int_addr" in
|
||||
*/*) ;;
|
||||
*) int_addr="$int_addr/32" ;;
|
||||
esac
|
||||
|
||||
echo "$action $ext_start${ext_end:+-}$ext_end $int_addr $int_start${int_end:+-}$int_end #$comment" >>$tmpconf
|
||||
echo "${action} ${ext_start}${ext_end:+-}${ext_end} ${int_addr} ${int_start}${int_end:+-}${int_end}" >>$tmpconf
|
||||
}
|
||||
|
||||
upnpd_write_bool() {
|
||||
local opt="$1"
|
||||
local def="${2:-0}"
|
||||
local alt="${3:-$opt}"
|
||||
local alt="$3"
|
||||
local val
|
||||
|
||||
config_get_bool val config "$opt" "$def"
|
||||
if [ "$val" -eq 0 ]; then
|
||||
echo "$alt=no" >> $tmpconf
|
||||
echo "${alt:-$opt}=no" >> $tmpconf
|
||||
else
|
||||
echo "$alt=yes" >> $tmpconf
|
||||
echo "${alt:-$opt}=yes" >> $tmpconf
|
||||
fi
|
||||
}
|
||||
|
||||
@ -66,18 +68,18 @@ start() {
|
||||
local extip port usesysuptime conffile serial_number model_number
|
||||
local uuid notify_interval presentation_url enable_upnp
|
||||
local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
|
||||
local ipv6_listening_ip enabled
|
||||
local ipv6_listening_ip enabled
|
||||
|
||||
config_get_bool enabled config enabled 1
|
||||
|
||||
[ "$enabled" -eq 0 ] && return 1
|
||||
[ "$enabled" -gt 0 ] || return 1
|
||||
|
||||
config_get extiface config external_iface
|
||||
config_get extzone config external_zone
|
||||
config_get intiface config internal_iface
|
||||
config_get extip config external_ip
|
||||
config_get port config port 5000
|
||||
config_get upload config upload
|
||||
config_get upload config upload
|
||||
config_get download config download
|
||||
config_get_bool logging config log_output 0
|
||||
config_get conffile config config_file
|
||||
@ -91,10 +93,12 @@ start() {
|
||||
config_get clean_ruleset_interval config clean_ruleset_interval
|
||||
config_get ipv6_listening_ip config ipv6_listening_ip
|
||||
|
||||
local args ifname
|
||||
local args
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
local ifname
|
||||
|
||||
# manual external interface overrides everything
|
||||
if [ -z "$extiface" ] ; then
|
||||
# manual external zone (if dynamically find interfaces
|
||||
@ -106,7 +110,7 @@ start() {
|
||||
[ -n "$extiface" ] || network_find_wan6 extiface
|
||||
fi
|
||||
|
||||
[ -n "$ifname" ] || network_get_device ifname $extiface
|
||||
[ -n "$ifname" ] || network_get_device ifname ${extiface}
|
||||
|
||||
if [ -n "$conffile" ]; then
|
||||
args="-f $conffile"
|
||||
@ -137,7 +141,6 @@ start() {
|
||||
upnpd_write_bool secure_mode 1
|
||||
upnpd_write_bool pcp_allow_thirdparty 0
|
||||
upnpd_write_bool system_uptime 1
|
||||
upnpd_write_bool igdv1 0 force_igd_desc_v1
|
||||
|
||||
[ -n "$upnp_lease_file" ] && \
|
||||
echo "lease_file=$upnp_lease_file" >>$tmpconf
|
||||
@ -177,13 +180,13 @@ start() {
|
||||
[ -n "${model_number}" ] && \
|
||||
echo "model_number=${model_number}" >>$tmpconf
|
||||
|
||||
config_foreach conf_rule_add perm_rule "$tmpconf"
|
||||
config_foreach conf_rule_add perm_rule "$tmpconf"
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$ifname" ]; then
|
||||
# start firewall
|
||||
iptables -L MINIUPNPD >/dev/null 2>&1 || fw3 reload
|
||||
iptables -L MINIUPNPD >/dev/null 2>/dev/null || fw3 reload
|
||||
|
||||
if [ "$logging" = "1" ]; then
|
||||
SERVICE_DAEMONIZE=1 \
|
||||
@ -201,7 +204,6 @@ stop() {
|
||||
service_stop /usr/sbin/miniupnpd
|
||||
|
||||
iptables -t nat -F MINIUPNPD 2>/dev/null
|
||||
iptables -t nat -F MINIUPNPD-POSTROUTING 2>/dev/null
|
||||
iptables -t filter -F MINIUPNPD 2>/dev/null
|
||||
|
||||
[ -x /usr/sbin/ip6tables ] && {
|
||||
|
@ -6,13 +6,12 @@ config upnpd config
|
||||
option log_output 0
|
||||
option download 1024
|
||||
option upload 512
|
||||
#by default, looked up dynamically from ubus
|
||||
# option external_iface wan
|
||||
#by default, looked up dynamically from ubus
|
||||
#option external_iface wan
|
||||
option internal_iface lan
|
||||
option port 5000
|
||||
option upnp_lease_file /var/run/miniupnpd.leases
|
||||
option igdv1 0
|
||||
|
||||
option upnp_lease_file /var/upnp.leases
|
||||
|
||||
config perm_rule
|
||||
option action allow
|
||||
option ext_ports 1024-65535
|
||||
@ -21,8 +20,8 @@ config perm_rule
|
||||
option comment "Allow high ports"
|
||||
|
||||
config perm_rule
|
||||
option action deny
|
||||
option ext_ports 0-65535
|
||||
option int_addr 0.0.0.0/0
|
||||
option int_ports 0-65535
|
||||
option comment "Default deny"
|
||||
option action deny
|
||||
option ext_ports 0-65535
|
||||
option int_addr 0.0.0.0/0
|
||||
option int_ports 0-65535
|
||||
option comment "Default deny"
|
||||
|
@ -1,58 +0,0 @@
|
||||
--- a/genconfig.sh
|
||||
+++ b/genconfig.sh
|
||||
@@ -379,12 +379,19 @@ case $FW in
|
||||
esac
|
||||
|
||||
# UUID API
|
||||
-if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
|
||||
- echo "#define BSD_UUID" >> ${CONFIGFILE}
|
||||
-fi
|
||||
-if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
|
||||
- echo "#define LIB_UUID" >> ${CONFIGFILE}
|
||||
-fi
|
||||
+case $OS_NAME in
|
||||
+ OpenWRT)
|
||||
+ echo "#define LIB_UUID" >> ${CONFIGFILE}
|
||||
+ ;;
|
||||
+ *)
|
||||
+ if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
|
||||
+ echo "#define BSD_UUID" >> ${CONFIGFILE}
|
||||
+ fi
|
||||
+ if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
|
||||
+ echo "#define LIB_UUID" >> ${CONFIGFILE}
|
||||
+ fi
|
||||
+ ;;
|
||||
+esac
|
||||
|
||||
# set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
|
||||
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
|
||||
--- a/Makefile.linux
|
||||
+++ b/Makefile.linux
|
||||
@@ -73,7 +73,10 @@ CPPFLAGS += -DIPTABLES_143
|
||||
endif
|
||||
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
|
||||
+#OpenWrt packager passes correct libraries
|
||||
+ifeq ($(TARGET_OPENWRT),)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc)
|
||||
+endif
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
|
||||
else
|
||||
@@ -153,6 +156,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
|
||||
endif # ($(TEST),1)
|
||||
|
||||
+# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
|
||||
+ifeq ($(TARGET_OPENWRT),)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
|
||||
|
||||
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
|
||||
@@ -161,6 +166,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
|
||||
else
|
||||
$(info please install uuid-dev package / libuuid)
|
||||
endif # ($(TEST),1)
|
||||
+endif # ($(TARGET_OPENWRT,)
|
||||
|
||||
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
||||
|
23
net/miniupnpd/patches/101-no-ssl-uuid.patch
Normal file
23
net/miniupnpd/patches/101-no-ssl-uuid.patch
Normal file
@ -0,0 +1,23 @@
|
||||
We do not need to autodetect SSL/UUID; SSL we do not support, UUID we always do.
|
||||
|
||||
--- a/Makefile.linux
|
||||
+++ b/Makefile.linux
|
||||
@@ -153,14 +153,18 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
|
||||
endif # ($(TEST),1)
|
||||
|
||||
+ifeq ($(TARGET_OPENWRT),)
|
||||
+# n/a - we don't enable https server for IGD v2 anyway in OpenWrt
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
|
||||
|
||||
+# n/a - we hardcodedly support libuuid
|
||||
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
|
||||
ifeq ($(TEST),1)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l uuid)
|
||||
else
|
||||
$(info please install uuid-dev package / libuuid)
|
||||
endif # ($(TEST),1)
|
||||
+endif
|
||||
|
||||
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
||||
|
10
net/miniupnpd/patches/102-ipv6-ext-port.patch
Normal file
10
net/miniupnpd/patches/102-ipv6-ext-port.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/pcpserver.c
|
||||
+++ b/pcpserver.c
|
||||
@@ -982,6 +982,7 @@ static int CreatePCPMap_NAT(pcp_info_t *
|
||||
timestamp);
|
||||
if (r < 0)
|
||||
return PCP_ERR_NO_RESOURCES;
|
||||
+ pcp_msg_info->ext_port = pcp_msg_info->int_port;
|
||||
return PCP_SUCCESS;
|
||||
}
|
||||
|
27
net/miniupnpd/patches/103-no-ipv6-autodetection.patch
Normal file
27
net/miniupnpd/patches/103-no-ipv6-autodetection.patch
Normal file
@ -0,0 +1,27 @@
|
||||
The miniupnpd makefile tries to autodetect iptables capabilities.
|
||||
This will incorrectly detect capabilities such as ipv6 support even though it is disabled for the target build.
|
||||
|
||||
As the OpenWRT buildsystem already passes the right compile flags, we can skip the autodetection.
|
||||
|
||||
|
||||
--- a/netfilter/Makefile
|
||||
+++ b/netfilter/Makefile
|
||||
@@ -38,8 +38,6 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
-LIBS += /lib/libip4tc.so /lib/libip6tc.so
|
||||
-
|
||||
all: iptcrdr.o testiptcrdr iptpinhole.o \
|
||||
testiptcrdr_peer testiptcrdr_dscp test_nfct_get
|
||||
# testiptpinhole
|
||||
--- a/Makefile.linux
|
||||
+++ b/Makefile.linux
|
||||
@@ -73,7 +73,6 @@ CPPFLAGS += -DIPTABLES_143
|
||||
endif
|
||||
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
|
||||
-LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
|
||||
else
|
20
net/miniupnpd/patches/104-always-libuuid.patch
Normal file
20
net/miniupnpd/patches/104-always-libuuid.patch
Normal file
@ -0,0 +1,20 @@
|
||||
As it turns out, the 'magic' libuuid/bsd uuid check just checks
|
||||
outside buildtree altogether for the uuid_generate. So we just
|
||||
hardcode it.
|
||||
|
||||
--- a/genconfig.sh
|
||||
+++ b/genconfig.sh
|
||||
@@ -367,12 +367,7 @@ case $FW in
|
||||
esac
|
||||
|
||||
# UUID API
|
||||
-if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
|
||||
- echo "#define BSD_UUID" >> ${CONFIGFILE}
|
||||
-fi
|
||||
-if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
|
||||
- echo "#define LIB_UUID" >> ${CONFIGFILE}
|
||||
-fi
|
||||
+echo "#define LIB_UUID" >> ${CONFIGFILE}
|
||||
|
||||
# set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
|
||||
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
|
@ -8,8 +8,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mwan3
|
||||
PKG_VERSION:=2.6.17
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=2.6.18
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
|
@ -19,109 +19,14 @@ config interface 'wan'
|
||||
option down '3'
|
||||
option up '8'
|
||||
|
||||
config interface 'wan6'
|
||||
option enabled '0'
|
||||
list track_ip '2001:4860:4860::8844'
|
||||
list track_ip '2001:4860:4860::8888'
|
||||
list track_ip '2620:0:ccd::2'
|
||||
list track_ip '2620:0:ccc::2'
|
||||
option family 'ipv6'
|
||||
option reliability '2'
|
||||
option count '1'
|
||||
option timeout '2'
|
||||
option interval '5'
|
||||
option down '3'
|
||||
option up '8'
|
||||
|
||||
config interface 'wanb'
|
||||
option enabled '0'
|
||||
list track_ip '114.114.114.114'
|
||||
list track_ip '114.114.115.115'
|
||||
option family 'ipv4'
|
||||
option reliability '1'
|
||||
option count '1'
|
||||
option timeout '2'
|
||||
option interval '5'
|
||||
option down '3'
|
||||
option up '8'
|
||||
|
||||
config interface 'wanb6'
|
||||
option enabled '0'
|
||||
list track_ip '2001:4860:4860::8888'
|
||||
list track_ip '2620:0:ccc::2'
|
||||
option family 'ipv6'
|
||||
option reliability '1'
|
||||
option count '1'
|
||||
option timeout '2'
|
||||
option interval '5'
|
||||
option down '3'
|
||||
option up '8'
|
||||
|
||||
config member 'wan_m1_w3'
|
||||
option interface 'wan'
|
||||
option metric '1'
|
||||
option weight '3'
|
||||
|
||||
config member 'wan_m2_w3'
|
||||
option interface 'wan'
|
||||
option metric '2'
|
||||
option weight '3'
|
||||
|
||||
config member 'wanb_m1_w2'
|
||||
option interface 'wanb'
|
||||
option metric '1'
|
||||
option weight '2'
|
||||
|
||||
config member 'wanb_m2_w2'
|
||||
option interface 'wanb'
|
||||
option metric '2'
|
||||
option weight '2'
|
||||
|
||||
config member 'wan6_m1_w3'
|
||||
option interface 'wan6'
|
||||
option metric '1'
|
||||
option weight '3'
|
||||
|
||||
config member 'wan6_m2_w3'
|
||||
option interface 'wan6'
|
||||
option metric '2'
|
||||
option weight '3'
|
||||
|
||||
config member 'wanb6_m1_w2'
|
||||
option interface 'wanb6'
|
||||
option metric '1'
|
||||
option weight '2'
|
||||
|
||||
config member 'wanb6_m2_w2'
|
||||
option interface 'wanb6'
|
||||
option metric '2'
|
||||
option weight '2'
|
||||
|
||||
config policy 'wan_only'
|
||||
list use_member 'wan_m1_w3'
|
||||
list use_member 'wan6_m1_w3'
|
||||
|
||||
config policy 'wanb_only'
|
||||
list use_member 'wanb_m1_w2'
|
||||
list use_member 'wanb6_m1_w2'
|
||||
|
||||
config policy 'balanced'
|
||||
option last_resort 'unreachable'
|
||||
list use_member 'wan_m1_w3'
|
||||
list use_member 'wanb_m1_w2'
|
||||
list use_member 'wan6_m1_w3'
|
||||
list use_member 'wanb6_m1_w2'
|
||||
|
||||
config policy 'wan_wanb'
|
||||
list use_member 'wan_m1_w3'
|
||||
list use_member 'wanb_m2_w2'
|
||||
list use_member 'wan6_m1_w3'
|
||||
list use_member 'wanb6_m2_w2'
|
||||
|
||||
config policy 'wanb_wan'
|
||||
list use_member 'wan_m2_w3'
|
||||
list use_member 'wanb_m1_w2'
|
||||
list use_member 'wan6_m2_w3'
|
||||
list use_member 'wanb6_m1_w2'
|
||||
|
||||
config rule 'https'
|
||||
option sticky '1'
|
||||
|
@ -198,6 +198,14 @@ mwan3_set_general_iptables()
|
||||
|
||||
if ! $IPT -S mwan3_hook &> /dev/null; then
|
||||
$IPT -N mwan3_hook
|
||||
# do not mangle ipv6 ra service
|
||||
if [ "$IPT" = "$IPT6" ]; then
|
||||
$IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 133 -j RETURN
|
||||
$IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 134 -j RETURN
|
||||
$IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 135 -j RETURN
|
||||
$IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 136 -j RETURN
|
||||
$IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 137 -j RETURN
|
||||
fi
|
||||
$IPT -A mwan3_hook -j CONNMARK --restore-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
|
||||
$IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_ifaces_in
|
||||
$IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_connected
|
||||
|
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sqm-scripts
|
||||
PKG_SOURCE_VERSION:=d0ac824ec0c5d0fc3593ce90d83a007da505856e
|
||||
PKG_VERSION:=1.2.4
|
||||
PKG_SOURCE_VERSION:=4d6ec3349026dac798b5dd84dbffa0bc8331ff04
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
|
||||
PKG_MIRROR_HASH:=2882aeae9f8b7827655bae8b0ecae60c405795a2a51aec8d3f2ae5fccecd76b9
|
||||
PKG_MIRROR_HASH:=ae61179fb60a44e5b657f4d6cdce861b91fc20c224465d2b2ddf2d12d1833edf
|
||||
PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
|
@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=subversion
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.10.0
|
||||
PKG_VERSION:=1.11.1
|
||||
PKG_SOURCE_URL:=@APACHE/subversion
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_HASH:=2cf23f3abb837dea0585a6b0ebd70e80e01f95bddef7c1aa097c18e3eaa6b584
|
||||
PKG_HASH:=9efd2750ca4d72ec903431a24b9c732b6cbb84aad9b7563f59dd96dea5be60bb
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_MACRO_PATHS:=build/ac-macros
|
||||
PKG_BUILD_DEPENDS:=apr-util
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=xtables-addons
|
||||
PKG_VERSION:=2.14
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=6
|
||||
PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 2b76b68c65c97fc11409088c3c30993324df8500 Mon Sep 17 00:00:00 2001
|
||||
From: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
|
||||
Date: Thu, 4 Jan 2018 18:50:50 +0100
|
||||
Subject: [PATCH] build: support for Linux 4.15
|
||||
|
||||
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
|
||||
---
|
||||
extensions/pknock/xt_pknock.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c
|
||||
index 6fbdea4..31d4bc8 100644
|
||||
--- a/extensions/pknock/xt_pknock.c
|
||||
+++ b/extensions/pknock/xt_pknock.c
|
||||
@@ -358,10 +358,20 @@ has_logged_during_this_minute(const struct peer *peer)
|
||||
* @r: rule
|
||||
*/
|
||||
static void
|
||||
-peer_gc(unsigned long r)
|
||||
+peer_gc(
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+ struct timer_list *tl
|
||||
+#else
|
||||
+ unsigned long r
|
||||
+#endif
|
||||
+)
|
||||
{
|
||||
unsigned int i;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+ struct xt_pknock_rule *rule = from_timer(rule, tl, timer);
|
||||
+#else
|
||||
struct xt_pknock_rule *rule = (struct xt_pknock_rule *)r;
|
||||
+#endif
|
||||
struct peer *peer;
|
||||
struct list_head *pos, *n;
|
||||
|
||||
@@ -469,9 +479,13 @@ add_rule(struct xt_pknock_mtinfo *info)
|
||||
if (rule->peer_head == NULL)
|
||||
goto out;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+ timer_setup(&rule->timer, peer_gc, 0);
|
||||
+#else
|
||||
init_timer(&rule->timer);
|
||||
rule->timer.function = peer_gc;
|
||||
rule->timer.data = (unsigned long)rule;
|
||||
+#endif
|
||||
|
||||
rule->status_proc = proc_create_data(info->rule_name, 0, pde,
|
||||
&pknock_proc_ops, rule);
|
@ -0,0 +1,25 @@
|
||||
From 3ea761a1ed338241fbc79bef8e433307e108b6cd Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Tue, 14 Aug 2018 14:29:30 +0200
|
||||
Subject: [PATCH] build: add support for Linux 4.18
|
||||
|
||||
---
|
||||
extensions/xt_DNETMAP.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/extensions/xt_DNETMAP.c b/extensions/xt_DNETMAP.c
|
||||
index 1b415c3..de7d4ec 100644
|
||||
--- a/extensions/xt_DNETMAP.c
|
||||
+++ b/extensions/xt_DNETMAP.c
|
||||
@@ -367,7 +367,11 @@ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
__be32 prenat_ip, postnat_ip, prenat_ip_prev;
|
||||
const struct xt_DNETMAP_tginfo *tginfo = par->targinfo;
|
||||
const struct nf_nat_range *mr = &tginfo->prefix;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
+ struct nf_nat_range2 newrange;
|
||||
+#else
|
||||
struct nf_nat_range newrange;
|
||||
+#endif
|
||||
struct dnetmap_entry *e;
|
||||
struct dnetmap_prefix *p;
|
||||
__s32 jttl;
|
@ -235,7 +235,7 @@
|
||||
+#endif /* _NETFILTER_MIME_H */
|
||||
--- /dev/null
|
||||
+++ b/extensions/rtsp/nf_conntrack_rtsp.c
|
||||
@@ -0,0 +1,732 @@
|
||||
@@ -0,0 +1,761 @@
|
||||
+/*
|
||||
+ * RTSP extension for IP connection tracking
|
||||
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
|
||||
@ -257,6 +257,9 @@
|
||||
+ * 2018-04-18: Hans Dedecker <dedeckeh at gmail.com>
|
||||
+ * - update RTP expected connection source IP based on SOURCE
|
||||
+ * in the SETUP reply message
|
||||
+ * 2018-08-03: Alin Nastac <alin.nastac at gmail.com>
|
||||
+ * Hans Dedecker <dedeckeh at gmail.com>
|
||||
+ * - parse non-standard destination=address:port format
|
||||
+ *
|
||||
+ * based on ip_conntrack_irc.c
|
||||
+ *
|
||||
@ -287,6 +290,7 @@
|
||||
+#include <net/netfilter/nf_conntrack.h>
|
||||
+#include <net/netfilter/nf_conntrack_expect.h>
|
||||
+#include <net/netfilter/nf_conntrack_helper.h>
|
||||
+#include <net/netfilter/nf_conntrack_zones.h>
|
||||
+#include "nf_conntrack_rtsp.h"
|
||||
+
|
||||
+#define NF_NEED_STRNCASECMP
|
||||
@ -500,6 +504,29 @@
|
||||
+ -1, NULL))
|
||||
+ pr_debug("source found : %pI4\n",
|
||||
+ &prtspexp->srvaddr.ip);
|
||||
+ } else if (nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
|
||||
+ const char *psep;
|
||||
+ u_int16_t port;
|
||||
+
|
||||
+ off += 12;
|
||||
+
|
||||
+ if (in4_pton(ptran+off, nextfieldoff - off - 1, (u8 *)&prtspexp->cltaddr.in, -1, NULL)) {
|
||||
+ pr_debug("destination found : %pI4\n", &prtspexp->cltaddr.ip);
|
||||
+
|
||||
+ /*
|
||||
+ * Some RTSP clients(mostly STBs) use non-standard destination parameters:
|
||||
+ * destination=address:port
|
||||
+ */
|
||||
+ psep = memchr(ptran+off, ':', nextfieldoff-off);
|
||||
+ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
|
||||
+ if (prtspexp->loport != 0 && prtspexp->loport != port)
|
||||
+ pr_debug("multiple ports found, port %hu ignored\n", port);
|
||||
+ else {
|
||||
+ pr_debug("lo port found : %hu\n", port);
|
||||
+ prtspexp->loport = prtspexp->hiport = port;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
@ -878,6 +905,8 @@
|
||||
+ ret = help_in(skb, rb_ptr, datalen, ct, ctinfo);
|
||||
+#endif
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ spin_unlock_bh(&rtsp_buffer_lock);
|
||||
@ -970,7 +999,7 @@
|
||||
+module_exit(fini);
|
||||
--- /dev/null
|
||||
+++ b/extensions/rtsp/nf_conntrack_rtsp.h
|
||||
@@ -0,0 +1,73 @@
|
||||
@@ -0,0 +1,74 @@
|
||||
+/*
|
||||
+ * RTSP extension for IP connection tracking.
|
||||
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
|
||||
@ -1022,6 +1051,7 @@
|
||||
+ u_int16_t loport; /* Port that was requested, low or first */
|
||||
+ u_int16_t hiport; /* Port that was requested, high or second */
|
||||
+ union nf_inet_addr srvaddr; /* src address in SETUP reply */
|
||||
+ union nf_inet_addr cltaddr; /* destination address */
|
||||
+#if 0
|
||||
+ uint method; /* RTSP method */
|
||||
+ uint cseq; /* CSeq from request */
|
||||
@ -1046,7 +1076,7 @@
|
||||
+#endif /* _IP_CONNTRACK_RTSP_H */
|
||||
--- /dev/null
|
||||
+++ b/extensions/rtsp/nf_nat_rtsp.c
|
||||
@@ -0,0 +1,617 @@
|
||||
@@ -0,0 +1,636 @@
|
||||
+/*
|
||||
+ * RTSP extension for TCP NAT alteration
|
||||
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
|
||||
@ -1206,9 +1236,9 @@
|
||||
+ struct nf_conntrack_tuple *rtp_t;
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||
+ char szextaddr[INET6_ADDRSTRLEN];
|
||||
+ char szextaddr[INET6_ADDRSTRLEN + 16];
|
||||
+#else
|
||||
+ char szextaddr[INET_ADDRSTRLEN];
|
||||
+ char szextaddr[INET_ADDRSTRLEN + 16];
|
||||
+#endif
|
||||
+ uint extaddrlen;
|
||||
+ int is_stun;
|
||||
@ -1341,8 +1371,9 @@
|
||||
+
|
||||
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
|
||||
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
|
||||
+ SKIP_WSPACE(ptran, nextfieldoff, off);
|
||||
+
|
||||
+ if (dstact != DSTACT_NONE && strncmp(ptran+off, "destination=", 12) == 0) {
|
||||
+ if (dstact != DSTACT_NONE && nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
|
||||
+ if (strncmp(ptran+off+12, szextaddr, extaddrlen) == 0)
|
||||
+ is_stun = 1;
|
||||
+
|
||||
@ -1353,12 +1384,28 @@
|
||||
+ uint dstreplen = 0;
|
||||
+ diff = dstlen;
|
||||
+ if (dstact == DSTACT_AUTO && !is_stun) {
|
||||
+ pr_debug("RTSP: replace dst addr\n");
|
||||
+ const char* psep = memchr(ptran+off, ':', dstlen);
|
||||
+ u_int16_t port;
|
||||
+
|
||||
+ dstoff += 12;
|
||||
+ dstlen -= 13;
|
||||
+ pdstrep = szextaddr;
|
||||
+ dstreplen = extaddrlen;
|
||||
+ diff = nextfieldoff-off-13-extaddrlen;
|
||||
+
|
||||
+ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
|
||||
+ pr_debug("RTSP: replace dst addr&port\n");
|
||||
+
|
||||
+ if (port != prtspexp->loport) {
|
||||
+ pr_debug("multiple ports found, port %hu ignored\n", port);
|
||||
+ dstreplen = extaddrlen;
|
||||
+ } else {
|
||||
+ sprintf(szextaddr+extaddrlen, ":%s", rbuf1);
|
||||
+ dstreplen = extaddrlen+1+rbuf1len;
|
||||
+ }
|
||||
+ } else {
|
||||
+ pr_debug("RTSP: replace dst addr\n");
|
||||
+ dstreplen = extaddrlen;
|
||||
+ }
|
||||
+ diff = nextfieldoff-off-13-dstreplen;
|
||||
+ }
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||
@ -1396,7 +1443,7 @@
|
||||
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
|
||||
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
|
||||
+
|
||||
+ if (strncmp(ptran+off, "client_port=", 12) == 0) {
|
||||
+ if (nextfieldoff - off > 12 && strncmp(ptran+off, "client_port=", 12) == 0) {
|
||||
+ u_int16_t port;
|
||||
+ uint numlen;
|
||||
+ uint origoff;
|
||||
@ -1583,7 +1630,9 @@
|
||||
+
|
||||
+static void nf_nat_rtsp_expected(struct nf_conn* ct, struct nf_conntrack_expect *exp)
|
||||
+{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)
|
||||
+ struct nf_nat_range2 range;
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||
+ struct nf_nat_range range;
|
||||
+#else
|
||||
+ struct nf_nat_ipv4_range range;
|
||||
|
@ -6,16 +6,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zerotier
|
||||
PKG_VERSION:=1.2.8
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.4.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=08e2df34550d6bb68e106eaac48babb481160046818b0944ec41f1e158548a47
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=557a444127812384265ec97232bae43dce1d4b1545ddd72e2b1646c971dad7c5
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -27,7 +28,6 @@ define Package/zerotier
|
||||
TITLE:=Create flat virtual Ethernet networks of almost unlimited size
|
||||
URL:=https://www.zerotier.com
|
||||
SUBMENU:=VPN
|
||||
MAINTAINER:=Moritz Warning <moritzwarning@web.de>
|
||||
endef
|
||||
|
||||
define Package/zerotier/description
|
||||
@ -54,7 +54,15 @@ endef
|
||||
|
||||
# Make binary smaller
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
||||
|
||||
ifdef CONFIG_USE_UCLIBC
|
||||
TARGET_CFLAGS += -D'valloc(a)=aligned_alloc(getpagesize(),a)'
|
||||
endif
|
||||
|
||||
define Package/zerotier/conffiles
|
||||
/etc/config/zerotier
|
||||
endef
|
||||
|
||||
define Package/zerotier/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
@ -66,10 +74,7 @@ ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,zerotier))
|
||||
|
@ -3,12 +3,13 @@ config zerotier sample_config
|
||||
option enabled 0
|
||||
|
||||
# persistent configuration folder (for ZT controller mode)
|
||||
#option config_path '/etc/zerotier'
|
||||
option config_path '/etc/zerotier'
|
||||
|
||||
#option port '9993'
|
||||
|
||||
# Generate secret on first start
|
||||
option secret 'generate'
|
||||
option secret ''
|
||||
|
||||
# Join a public network called Earth
|
||||
list join '8056c2e21c000001'
|
||||
#list join '<other_network>'
|
39
net/zerotier/files/zerotier.init → net/zerotier/files/etc/init.d/zerotier
Normal file → Executable file
39
net/zerotier/files/zerotier.init → net/zerotier/files/etc/init.d/zerotier
Normal file → Executable file
@ -9,13 +9,13 @@ CONFIG_PATH=/var/lib/zerotier-one
|
||||
|
||||
section_enabled() {
|
||||
config_get_bool enabled "$1" 'enabled' 0
|
||||
[ $enabled -gt 0 ]
|
||||
[ $enabled -ne 0 ]
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local cfg="$1"
|
||||
local port secret config_path
|
||||
local ARGS=""
|
||||
local port secret config_path path
|
||||
local args=""
|
||||
|
||||
if ! section_enabled "$cfg"; then
|
||||
echo "disabled in config"
|
||||
@ -23,29 +23,35 @@ start_instance() {
|
||||
fi
|
||||
|
||||
config_get config_path $cfg 'config_path'
|
||||
config_get_bool port $cfg 'port'
|
||||
config_get port $cfg 'port'
|
||||
config_get secret $cfg 'secret'
|
||||
|
||||
path=${CONFIG_PATH}_$cfg
|
||||
|
||||
# Remove existing link or folder
|
||||
rm -rf $CONFIG_PATH
|
||||
rm -rf $path
|
||||
|
||||
# Create link from CONFIG_PATH to config_path
|
||||
if [ -n "$config_path" -a "$config_path" != $CONFIG_PATH ]; then
|
||||
if [ -n "$config_path" -a "$config_path" != "$path" ]; then
|
||||
if [ ! -d "$config_path" ]; then
|
||||
echo "ZeroTier config_path does not exist: $config_path"
|
||||
echo "ZeroTier config_path does not exist: $config_path" 1>&2
|
||||
return
|
||||
fi
|
||||
|
||||
ln -s $config_path $CONFIG_PATH
|
||||
ln -s $config_path $path
|
||||
fi
|
||||
|
||||
mkdir -p $CONFIG_PATH/networks.d
|
||||
mkdir -p $path/networks.d
|
||||
|
||||
# link latest default config path to latest config path
|
||||
rm -f $CONFIG_PATH
|
||||
ln -s $path $CONFIG_PATH
|
||||
|
||||
if [ -n "$port" ]; then
|
||||
ARGS="$ARGS -p$port"
|
||||
args="$args -p${port}"
|
||||
fi
|
||||
|
||||
if [ "$secret" = "generate" ]; then
|
||||
if [ -z "$secret" ]; then
|
||||
echo "Generate secret - please wait..."
|
||||
local sf="/tmp/zt.$cfg.secret"
|
||||
|
||||
@ -60,20 +66,20 @@ start_instance() {
|
||||
fi
|
||||
|
||||
if [ -n "$secret" ]; then
|
||||
echo "$secret" > $CONFIG_PATH/identity.secret
|
||||
echo "$secret" > $path/identity.secret
|
||||
# make sure there is not previous identity.public
|
||||
rm -f $CONFIG_PATH/identity.public
|
||||
rm -f $path/identity.public
|
||||
fi
|
||||
|
||||
add_join() {
|
||||
# an (empty) config file will cause ZT to join a network
|
||||
touch $CONFIG_PATH/networks.d/$1.conf
|
||||
touch $path/networks.d/$1.conf
|
||||
}
|
||||
|
||||
config_list_foreach $cfg 'join' add_join
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG $ARGS $CONFIG_PATH
|
||||
procd_set_param command $PROG $args $path
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
@ -87,10 +93,11 @@ stop_instance() {
|
||||
local cfg="$1"
|
||||
|
||||
# Remove existing link or folder
|
||||
rm -rf $CONFIG_PATH
|
||||
rm -rf ${CONFIG_PATH}_${cfg}
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
config_load 'zerotier'
|
||||
config_foreach stop_instance 'zerotier'
|
||||
rm -f ${CONFIG_PATH}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
From c578216351a4daa3916265b39b14f7c23ef15c90 Mon Sep 17 00:00:00 2001
|
||||
From 14454285d7ef5b9cd134c86059933036c1aa2fef Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 23 Apr 2018 22:12:31 +0200
|
||||
Subject: [PATCH 1/4] find miniupnpc.h in staging directory
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH 1/4] find miniupnpc.h in staging directory
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/make-linux.mk b/make-linux.mk
|
||||
index 2e6a8632..0cd955d1 100644
|
||||
index b81c7aeb..a547125d 100644
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -22,8 +22,8 @@ ONE_OBJS+=osdep/LinuxEthernetTap.o
|
||||
@@ -29,8 +29,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M")
|
||||
# otherwise build into binary as done on Mac and Windows.
|
||||
ONE_OBJS+=osdep/PortMapper.o
|
||||
override DEFS+=-DZT_USE_MINIUPNPC
|
||||
@ -23,5 +23,5 @@ index 2e6a8632..0cd955d1 100644
|
||||
override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
|
||||
LDLIBS+=-lminiupnpc
|
||||
--
|
||||
2.17.0
|
||||
2.22.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7cfe751128d412a9b780ba5e4cb11908fc71cd3d Mon Sep 17 00:00:00 2001
|
||||
From 68fe97ef6b05e3709cd4b67c7681dcfc63bfaf80 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 30 Apr 2018 16:14:30 +0200
|
||||
Subject: [PATCH 2/4] remove -pie
|
||||
@ -10,10 +10,10 @@ when making a shared object; recompile with -fPIC" error
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/make-linux.mk b/make-linux.mk
|
||||
index 0cd955d1..add1d3ae 100644
|
||||
index a547125d..13244741 100644
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -71,11 +71,11 @@ ifeq ($(ZT_DEBUG),1)
|
||||
@@ -77,11 +77,11 @@ ifeq ($(ZT_DEBUG),1)
|
||||
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
|
||||
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
||||
else
|
||||
@ -29,5 +29,5 @@ index 0cd955d1..add1d3ae 100644
|
||||
STRIP+=--strip-all
|
||||
endif
|
||||
--
|
||||
2.17.0
|
||||
2.22.0
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
From a856855ab97e0775a08e1571a4ad26c264cb13f4 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Sun, 4 Aug 2019 03:56:37 +0200
|
||||
Subject: [PATCH 3/4] remove arm32 conservative CFLAGS
|
||||
|
||||
---
|
||||
make-linux.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/make-linux.mk b/make-linux.mk
|
||||
index 13244741..fd164dfa 100644
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -262,7 +262,7 @@ ifeq ($(ZT_OFFICIAL),1)
|
||||
endif
|
||||
|
||||
# ARM32 hell -- use conservative CFLAGS
|
||||
-ifeq ($(ZT_ARCHITECTURE),3)
|
||||
+ifeq (0,3)
|
||||
ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
|
||||
override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,33 +0,0 @@
|
||||
From bfb1a652dbf897dc065d2a1414296eb145a2224b Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 23 Apr 2018 22:31:03 +0200
|
||||
Subject: [PATCH 3/4] remove -march=armv5
|
||||
|
||||
---
|
||||
make-linux.mk | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/make-linux.mk b/make-linux.mk
|
||||
index add1d3ae..49e14f70 100644
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -229,12 +229,12 @@ endif
|
||||
# ARM32 hell -- use conservative CFLAGS
|
||||
ifeq ($(ZT_ARCHITECTURE),3)
|
||||
ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
|
||||
- override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
- override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
+ override CFLAGS+=-mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
+ override CXXFLAGS+=-mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
ZT_USE_ARM32_NEON_ASM_CRYPTO=0
|
||||
else
|
||||
- override CFLAGS+=-march=armv5 -mno-unaligned-access -marm
|
||||
- override CXXFLAGS+=-march=armv5 -mno-unaligned-access -marm
|
||||
+ override CFLAGS+=-mno-unaligned-access -marm
|
||||
+ override CXXFLAGS+=-mno-unaligned-access -marm
|
||||
endif
|
||||
endif
|
||||
|
||||
--
|
||||
2.17.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a2cf8bf645d25f18cbc2ed7ad4b9a25725811afd Mon Sep 17 00:00:00 2001
|
||||
From 5169e5328525af28f6b7de087ece10a9bc0a2282 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Wed, 2 May 2018 16:06:46 +0200
|
||||
Subject: [PATCH 4/4] accept external linker flags
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH 4/4] accept external linker flags
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/make-linux.mk b/make-linux.mk
|
||||
index 49e14f70..8e766bfb 100644
|
||||
index fd164dfa..29ff8813 100644
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -75,7 +75,7 @@ else
|
||||
@@ -81,7 +81,7 @@ else
|
||||
override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
CXXFLAGS?=-O3 -fstack-protector
|
||||
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
@ -21,5 +21,5 @@ index 49e14f70..8e766bfb 100644
|
||||
STRIP+=--strip-all
|
||||
endif
|
||||
--
|
||||
2.17.0
|
||||
2.22.0
|
||||
|
||||
|
11
net/zerotier/patches/0005-link-natpmp.patch
Normal file
11
net/zerotier/patches/0005-link-natpmp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -38,7 +38,7 @@ else
|
||||
override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
|
||||
ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
|
||||
endif
|
||||
-ifeq ($(wildcard /usr/include/natpmp.h),)
|
||||
+ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
|
||||
ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
|
||||
else
|
||||
LDLIBS+=-lnatpmp
|
@ -9,11 +9,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qemu
|
||||
PKG_VERSION:=2.11.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_HASH:=d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb
|
||||
PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
|
||||
PKG_SOURCE_URL:=http://download.qemu.org/
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
|
||||
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
|
||||
@ -96,6 +96,34 @@ define Package/qemu-bridge-helper/install
|
||||
$(INSTALL_DATA) ./files/bridge.conf $(1)/etc/qemu
|
||||
endef
|
||||
|
||||
define Package/qemu-img
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=QEMU Image utility
|
||||
URL:=http://www.qemu.org
|
||||
DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
|
||||
endef
|
||||
|
||||
define Package/qemu-img/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-img $(1)/usr/bin/qemu-img
|
||||
endef
|
||||
|
||||
define Package/qemu-nbd
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=QEMU Network Block Device Utility
|
||||
URL:=http://www.qemu.org
|
||||
DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) +kmod-nbd
|
||||
endef
|
||||
|
||||
define Package/qemu-nbd/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-nbd $(1)/usr/sbin/qemu-nbd
|
||||
endef
|
||||
|
||||
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
|
||||
|
||||
# Naming rules used in qemu Makefile.target
|
||||
@ -165,75 +193,77 @@ CONFIGURE_ARGS += \
|
||||
--disable-fortify-source \
|
||||
--disable-stack-protector \
|
||||
|
||||
# Make a list from QEMU source code for reference
|
||||
#
|
||||
# grep -E '^\s*--disable-[^)]+\)' configure | cut -f1 -d')' | sort -u
|
||||
#
|
||||
CONFIGURE_ARGS += \
|
||||
--audio-drv-list='' \
|
||||
--disable-attr \
|
||||
--disable-bluez \
|
||||
--disable-brlapi \
|
||||
--disable-bsd-user \
|
||||
--disable-bzip2 \
|
||||
--disable-cap-ng \
|
||||
--disable-cocoa \
|
||||
--disable-curl \
|
||||
--disable-debug-info \
|
||||
--disable-modules \
|
||||
--disable-sdl \
|
||||
--disable-qom-cast-debug \
|
||||
--disable-virtfs \
|
||||
--disable-vnc \
|
||||
--disable-debug-tcg \
|
||||
--disable-docs \
|
||||
--disable-gcrypt \
|
||||
--disable-glusterfs \
|
||||
--disable-gnutls \
|
||||
--disable-gtk \
|
||||
--disable-guest-agent-msi \
|
||||
--disable-jemalloc \
|
||||
--disable-libiscsi \
|
||||
--disable-libnfs \
|
||||
--disable-libpmem \
|
||||
--disable-libssh2 \
|
||||
--disable-libudev \
|
||||
--disable-libusb \
|
||||
--disable-libxml2 \
|
||||
--disable-linux-aio \
|
||||
--disable-lzo \
|
||||
--disable-modules \
|
||||
--disable-netmap \
|
||||
--disable-nettle \
|
||||
--disable-numa \
|
||||
--disable-opengl \
|
||||
--disable-qom-cast-debug \
|
||||
--disable-rbd \
|
||||
--disable-rdma \
|
||||
--disable-sdl \
|
||||
--disable-seccomp \
|
||||
--disable-smartcard \
|
||||
--disable-snappy \
|
||||
--disable-sparse \
|
||||
--disable-spice \
|
||||
--disable-strip \
|
||||
--disable-vnc-sasl \
|
||||
--disable-vnc-jpeg \
|
||||
--disable-vnc-png \
|
||||
--disable-tcg-interpreter \
|
||||
--disable-tcmalloc \
|
||||
--disable-tools \
|
||||
--disable-tpm \
|
||||
--disable-usb-redir \
|
||||
--disable-uuid \
|
||||
--disable-vde \
|
||||
--disable-netmap \
|
||||
--disable-vhdx \
|
||||
--disable-virglrenderer \
|
||||
--disable-virtfs \
|
||||
--disable-vnc \
|
||||
--disable-vnc-jpeg \
|
||||
--disable-vnc-png \
|
||||
--disable-vnc-sasl \
|
||||
--disable-vte \
|
||||
--disable-werror \
|
||||
--disable-xen \
|
||||
--disable-xen-pci-passthrough \
|
||||
--disable-xen-pv-domain-build \
|
||||
--disable-brlapi \
|
||||
--disable-bluez \
|
||||
--disable-tcg-interpreter \
|
||||
--disable-cap-ng \
|
||||
--disable-spice \
|
||||
--disable-libiscsi \
|
||||
--disable-libnfs \
|
||||
--disable-cocoa \
|
||||
--disable-bsd-user \
|
||||
--disable-curl \
|
||||
--disable-linux-aio \
|
||||
--disable-attr \
|
||||
--disable-docs \
|
||||
--disable-opengl \
|
||||
--disable-rbd \
|
||||
--disable-xfsctl \
|
||||
--disable-smartcard \
|
||||
--disable-libusb \
|
||||
--disable-usb-redir \
|
||||
--disable-zlib-test \
|
||||
--disable-lzo \
|
||||
--disable-snappy \
|
||||
--disable-bzip2 \
|
||||
--disable-guest-agent-msi \
|
||||
--disable-tools \
|
||||
--disable-seccomp \
|
||||
--disable-glusterfs \
|
||||
--disable-gtk \
|
||||
--disable-gnutls \
|
||||
--disable-nettle \
|
||||
--disable-gcrypt \
|
||||
--disable-rdma \
|
||||
--disable-vte \
|
||||
--disable-virglrenderer \
|
||||
--disable-tpm \
|
||||
--disable-libssh2 \
|
||||
--disable-vhdx \
|
||||
--disable-numa \
|
||||
--disable-tcmalloc \
|
||||
--disable-jemalloc \
|
||||
--disable-strip \
|
||||
--disable-werror \
|
||||
|
||||
QEMU_CONFIGURE_TARGET_LIST := $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))
|
||||
CONFIGURE_ARGS += --target-list='$(QEMU_CONFIGURE_TARGET_LIST)'
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_qemu-ga),)
|
||||
CONFIGURE_ARGS += --enable-guest-agent
|
||||
endif
|
||||
CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
|
||||
|
||||
TARGET_LDFLAGS += -Wl,--as-needed
|
||||
MAKE_VARS += V=s
|
||||
@ -246,6 +276,8 @@ MAKE_FLAGS:=$(filter-out \
|
||||
QEMU_MAKE_TARGETS := \
|
||||
$(if $(CONFIG_PACKAGE_qemu-ga),qemu-ga) \
|
||||
$(if $(CONFIG_PACKAGE_qemu-bridge-helper),qemu-bridge-helper) \
|
||||
$(if $(CONFIG_PACKAGE_qemu-img),qemu-img) \
|
||||
$(if $(CONFIG_PACKAGE_qemu-nbd),qemu-nbd) \
|
||||
$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),subdir-$(target))) \
|
||||
|
||||
define Build/Compile
|
||||
@ -255,6 +287,8 @@ endef
|
||||
$(eval $(call BuildPackage,virtio-console-helper))
|
||||
$(eval $(call BuildPackage,qemu-ga))
|
||||
$(eval $(call BuildPackage,qemu-bridge-helper))
|
||||
$(eval $(call BuildPackage,qemu-img))
|
||||
$(eval $(call BuildPackage,qemu-nbd))
|
||||
$(eval $(call BuildPackage,qemu-blobs))
|
||||
$(foreach target,$(QEMU_TARGET_LIST), \
|
||||
$(eval $(call BuildPackage,qemu-$(target))) \
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0b4011cd0983ced6e065f397049f967656494793 Mon Sep 17 00:00:00 2001
|
||||
From 82d1bb429533dcab4278ed21afc19ee303d7d3f5 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Sat, 24 Feb 2018 13:43:19 +0800
|
||||
Subject: [PATCH 1/3] configure: allow disable fortify_source
|
||||
Subject: [PATCH 1/4] configure: allow disable fortify_source
|
||||
|
||||
Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
|
||||
OpenWrt base build system decide flavor of fortify_source to use
|
||||
@ -10,18 +10,15 @@ OpenWrt base build system decide flavor of fortify_source to use
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 0c6e757..8ea3fdd 100755
|
||||
index 0a3c6a72c3..d274df816c 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1313,6 +1313,8 @@ for opt do
|
||||
@@ -1491,6 +1491,8 @@ for opt do
|
||||
;;
|
||||
--disable-git-update) git_update=no
|
||||
--disable-libpmem) libpmem=no
|
||||
;;
|
||||
+ --disable-fortify-source) fortify_source="no"
|
||||
+ ;;
|
||||
*)
|
||||
echo "ERROR: unknown option $opt"
|
||||
echo "Try '$0 --help' for more information"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 4d7955f069922c482886e03e5cd352281dbce146 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Tue, 2 Apr 2019 06:31:31 +0000
|
||||
Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
|
||||
line
|
||||
|
||||
---
|
||||
configure | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index d274df816c..a138faeb72 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1491,6 +1491,10 @@ for opt do
|
||||
;;
|
||||
--disable-libpmem) libpmem=no
|
||||
;;
|
||||
+ --enable-libudev) libudev=yes
|
||||
+ ;;
|
||||
+ --disable-libudev) libudev=no
|
||||
+ ;;
|
||||
--disable-fortify-source) fortify_source="no"
|
||||
;;
|
||||
*)
|
@ -1,14 +1,14 @@
|
||||
From 83e72b93889fbcbbfff281b0dbcc58c5a7455257 Mon Sep 17 00:00:00 2001
|
||||
From c480c25cf9265fe8e90c2c26d65c8a2fa174b0ea Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Sat, 24 Feb 2018 13:45:25 +0800
|
||||
Subject: [PATCH 2/3] disas: fix compilation failure when isnan is a macro
|
||||
Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
|
||||
|
||||
---
|
||||
disas/libvixl/vixl/utils.h | 16 +++++++++++-----
|
||||
1 file changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
|
||||
index 5ab134e..df30663 100644
|
||||
index 5ab134e240..df30663df8 100644
|
||||
--- a/disas/libvixl/vixl/utils.h
|
||||
+++ b/disas/libvixl/vixl/utils.h
|
||||
@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
|
||||
@ -64,6 +64,3 @@ index 5ab134e..df30663 100644
|
||||
return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b6d4bff30f2bdc3a6f26c9f6c7f32e352270d119 Mon Sep 17 00:00:00 2001
|
||||
From e030d1c14119e880a52788dd04325d489cf455ae Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Sat, 24 Feb 2018 13:46:31 +0800
|
||||
Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
|
||||
Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
|
||||
driver
|
||||
|
||||
---
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
|
||||
index a9a9e5e..f88b3ee 100644
|
||||
index a9a9e5e7eb..f88b3ee446 100644
|
||||
--- a/pc-bios/optionrom/Makefile
|
||||
+++ b/pc-bios/optionrom/Makefile
|
||||
@@ -34,7 +34,7 @@ endif
|
||||
@ -30,6 +30,3 @@ index a9a9e5e..f88b3ee 100644
|
||||
|
||||
%.img: %.o
|
||||
$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user