From 3f00aed153934ee0ee27e0605d6f9f2bbacd9695 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 25 Jun 2020 16:01:34 -0700 Subject: [PATCH 1/2] rsync: update to 3.2.1 Disable several options to enable compilation. Simplified several configure options. Remove pointless configure var. Added ssh hinting patch. Some SSH incompatibility. Signed-off-by: Rosen Penev --- net/rsync/Makefile | 47 +++++++------------ .../patches/010-disable-ssh-46-hint.patch | 19 ++++++++ 2 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 net/rsync/patches/010-disable-ssh-46-hint.patch diff --git a/net/rsync/Makefile b/net/rsync/Makefile index a0c6b4569..ff4231a1a 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rsync -PKG_VERSION:=3.1.3 -PKG_RELEASE:=3 +PKG_VERSION:=3.2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src -PKG_HASH:=55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0 +PKG_HASH:=95f2dd62979b500a99b34c1a6453a0787ada0330e4bec7fcffad37b9062d58d3 PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=GPL-3.0-or-later @@ -40,35 +40,22 @@ define Package/rsync/config endef CONFIGURE_ARGS += \ - --with-included-popt=no \ + --without-included-popt \ --disable-debug \ + --disable-asm \ + --disable-iconv \ + --disable-iconv-open \ + --disable-lz4 \ --disable-locale \ - -ifeq ($(CONFIG_RSYNC_xattr),y) - CONFIGURE_ARGS+= --enable-xattr-support -else - CONFIGURE_ARGS+= --disable-xattr-support -endif - -ifeq ($(CONFIG_RSYNC_acl),y) - CONFIGURE_ARGS+= --enable-acl-support -else - CONFIGURE_ARGS+= --disable-acl-support -endif - -ifeq ($(CONFIG_RSYNC_zlib),y) - CONFIGURE_ARGS+= --with-included-zlib=no -else - CONFIGURE_ARGS+= --with-included-zlib=yes -endif - -ifeq ($(CONFIG_IPV6),y) - TARGET_CFLAGS+= -DINET6 -else - CONFIGURE_ARGS+= --disable-ipv6 -endif - -CONFIGURE_VARS += rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes + --disable-md2man \ + --disable-openssl \ + --disable-simd \ + --disable-xxhash \ + --disable-zstd \ + --$(if $(CONFIG_RSYNC_xattr),en,dis)able-xattr-support \ + --$(if $(CONFIG_RSYNC_acl),en,dis)able-acl-support \ + --with$(if $(CONFIG_RSYNC_zlib),,out)-included-zlib \ + --$(if $(CONFIG_IPV6),en,dis)able-ipv6 define Package/rsyncd SECTION:=net diff --git a/net/rsync/patches/010-disable-ssh-46-hint.patch b/net/rsync/patches/010-disable-ssh-46-hint.patch new file mode 100644 index 000000000..cecee5403 --- /dev/null +++ b/net/rsync/patches/010-disable-ssh-46-hint.patch @@ -0,0 +1,19 @@ +diff --git a/main.c b/main.c +index b41a394..dd49f87 100644 +--- a/main.c ++++ b/main.c +@@ -572,14 +572,6 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in + args[argc++] = "-l"; + args[argc++] = user; + } +-#ifdef AF_INET +- if (default_af_hint == AF_INET && strcmp(t, "ssh") == 0) +- args[argc++] = "-4"; /* we're using ssh so we can add a -4 option */ +-#endif +-#ifdef AF_INET6 +- if (default_af_hint == AF_INET6 && strcmp(t, "ssh") == 0) +- args[argc++] = "-6"; /* we're using ssh so we can add a -6 option */ +-#endif + args[argc++] = machine; + #endif + From e1cd4bcf0a16f08e9b64271c2d3ec554348b7cba Mon Sep 17 00:00:00 2001 From: Maxim Storchak Date: Sun, 28 Jun 2020 14:54:18 +0300 Subject: [PATCH 2/2] rsync: fix ipv6 detection Signed-off-by: Maxim Storchak --- net/rsync/Makefile | 6 + .../patches/000-fix-ipv6-detection.patch | 170 ++++++++++++++++++ .../patches/010-disable-ssh-46-hint.patch | 19 -- 3 files changed, 176 insertions(+), 19 deletions(-) create mode 100644 net/rsync/patches/000-fix-ipv6-detection.patch delete mode 100644 net/rsync/patches/010-disable-ssh-46-hint.patch diff --git a/net/rsync/Makefile b/net/rsync/Makefile index ff4231a1a..9d154b840 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:rsync:rsync +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -57,6 +58,11 @@ CONFIGURE_ARGS += \ --with$(if $(CONFIG_RSYNC_zlib),,out)-included-zlib \ --$(if $(CONFIG_IPV6),en,dis)able-ipv6 +define Build/Configure + $(call Build/Configure/Default) + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" reconfigure +endef + define Package/rsyncd SECTION:=net CATEGORY:=Network diff --git a/net/rsync/patches/000-fix-ipv6-detection.patch b/net/rsync/patches/000-fix-ipv6-detection.patch new file mode 100644 index 000000000..b2fcb8c75 --- /dev/null +++ b/net/rsync/patches/000-fix-ipv6-detection.patch @@ -0,0 +1,170 @@ +commit f25dc9d21a9aba2d4c5f3d21273e1f7924d591be +Author: Maxim Storchak +Date: Sun Jun 28 14:23:03 2020 +0300 + + Based on Pierre-Olivier Mercier's patch for https://bugzilla.samba.org/show_bug.cgi?id=10715 + + Original commit message: + + From 811db086507aceaec0022798dd418956cdd4b54e Mon Sep 17 00:00:00 2001 + From: Pierre-Olivier Mercier + Date: Mon, 4 Sep 2017 22:29:55 +0200 + Subject: [PATCH] Test IPv6 compatibility instead of relying on library probes. + + Legacy configure behaviour was to detect IPv6 support through known IPv6 + capable version of common standard libraries. Now: it runs a POSIX test + to determine if IPv6 is usable (in case it has not been disabled). + --- + +diff --git a/configure.ac b/configure.ac +index 28865ea..7a2bbfe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -339,119 +339,36 @@ if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then + AC_SYS_LARGEFILE + fi + +-ipv6type=unknown +-ipv6lib=none +-ipv6trylibc=yes +- ++# Checks if IPv6 is requested ++AC_MSG_CHECKING([whether to enable ipv6]) + AC_ARG_ENABLE(ipv6, +- AS_HELP_STRING([--disable-ipv6],[turn off IPv6 support])) +-if test x"$enable_ipv6" != x"no"; then +- AC_MSG_CHECKING([ipv6 stack type]) +- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta cygwin; do +- case $i in +- inria) +- # http://www.kame.net/ +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef IPV6_INRIA_VERSION +-yes +-#endif], +- [ipv6type=$i; +- AC_DEFINE(INET6, 1, [true if you have IPv6]) +- ]) +- ;; +- kame) +- # http://www.kame.net/ +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef __KAME__ +-yes +-#endif], +- [ipv6type=$i; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- linux-glibc) +- # http://www.v6.linux.or.jp/ +- AC_EGREP_CPP(yes, [ +-#include +-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +-yes +-#endif], +- [ipv6type=$i; +-AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- linux-inet6) +- # http://www.v6.linux.or.jp/ +- if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then +- ipv6type=$i +- ipv6lib=inet6 +- ipv6libdir=/usr/inet6/lib +- ipv6trylibc=yes; +- AC_DEFINE(INET6, 1, [true if you have IPv6]) +- CFLAGS="-I/usr/inet6/include $CFLAGS" +- fi +- ;; +- solaris) +- # http://www.sun.com +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef __sun +-yes +-#endif], +- [ipv6type=$i; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- toshiba) +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef _TOSHIBA_INET6 +-yes +-#endif], +- [ipv6type=$i; +- ipv6lib=inet6; +- ipv6libdir=/usr/local/v6/lib; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- v6d) +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef __V6D__ +-yes +-#endif], +- [ipv6type=$i; +- ipv6lib=v6; +- ipv6libdir=/usr/local/v6/lib; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- zeta) +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef _ZETA_MINAMI_INET6 +-yes +-#endif], +- [ipv6type=$i; +- ipv6lib=inet6; +- ipv6libdir=/usr/local/v6/lib; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- cygwin) +- AC_EGREP_CPP(yes, [ +-#include +-#ifdef _CYGWIN_IN6_H +-yes +-#endif], +- [ipv6type=$i; +- AC_DEFINE(INET6, 1, [true if you have IPv6])]) +- ;; +- esac +- if test "$ipv6type" != "unknown"; then +- break +- fi +- done +- AC_MSG_RESULT($ipv6type) ++[ --disable-ipv6 disable ipv6 support], ++[ case "$enableval" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) AC_MSG_RESULT(yes) ++ AC_DEFINE(INET6, 1, [true if you have IPv6]) ++ ;; ++ esac ], + +- AC_SEARCH_LIBS(getaddrinfo, inet6) +-fi ++ AC_TRY_RUN([ /* AF_INET6 avalable check */ ++#include ++#include ++#include ++main() ++{ ++ if (socket(AF_INET6, SOCK_STREAM, 0) < 0) ++ exit(1); ++ else ++ exit(0); ++} ++], ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(INET6, 1, [true if you have IPv6]), ++ AC_MSG_RESULT(no), ++ AC_MSG_RESULT(no) ++)) + + dnl Do you want to disable use of locale functions + AC_ARG_ENABLE([locale], diff --git a/net/rsync/patches/010-disable-ssh-46-hint.patch b/net/rsync/patches/010-disable-ssh-46-hint.patch deleted file mode 100644 index cecee5403..000000000 --- a/net/rsync/patches/010-disable-ssh-46-hint.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/main.c b/main.c -index b41a394..dd49f87 100644 ---- a/main.c -+++ b/main.c -@@ -572,14 +572,6 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in - args[argc++] = "-l"; - args[argc++] = user; - } --#ifdef AF_INET -- if (default_af_hint == AF_INET && strcmp(t, "ssh") == 0) -- args[argc++] = "-4"; /* we're using ssh so we can add a -4 option */ --#endif --#ifdef AF_INET6 -- if (default_af_hint == AF_INET6 && strcmp(t, "ssh") == 0) -- args[argc++] = "-6"; /* we're using ssh so we can add a -6 option */ --#endif - args[argc++] = machine; - #endif -