Browse Source

rsync: enable selecting bundled or system zlib

rsync, by default, includes a patched zlib within its source tarball. The patch
enables a better compression ratio for rsync streams. However, the client and
server need the same featureset in their zlib in order to understand the
compression stream, or the server will abort the transfer. Older versions have
no understanding of the new compression standard used.

This patch allows the builder to choose whether to use the bundled or system
zlib. It defautls to using the system zlib, as is the default before this
patch.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Ian Leonard 10 years ago
parent
commit
0264b06472
2 changed files with 25 additions and 7 deletions
  1. 13
    0
      net/rsync/Config.in
  2. 12
    7
      net/rsync/Makefile

+ 13
- 0
net/rsync/Config.in View File

9
 		bool
9
 		bool
10
 		prompt "Enable ACL support"
10
 		prompt "Enable ACL support"
11
 		default n
11
 		default n
12
+
13
+	config RSYNC_zlib
14
+		bool
15
+		prompt "Enable system zlib"
16
+		help 
17
+			Use the system's zlib library instead of rsync's internal copy. Enabling
18
+			this may create compatibility errors when using compression  with older
19
+			clients, or those using the current default of the bundled zlib.
20
+
21
+			rsync's upstream default is to use their bundled zlib. OpenWrt uses the
22
+			system zlib for space reasons. The system zlib will eventually become 
23
+			default for upstream as well.
24
+		default y
12
 endif
25
 endif

+ 12
- 7
net/rsync/Makefile View File

29
   CATEGORY:=Network
29
   CATEGORY:=Network
30
   SUBMENU:=File Transfer
30
   SUBMENU:=File Transfer
31
   TITLE:=Fast remote file copy program (like rcp)
31
   TITLE:=Fast remote file copy program (like rcp)
32
-  DEPENDS:=+libpopt +zlib +RSYNC_xattr:libattr +RSYNC_acl:libacl
32
+  DEPENDS:=+libpopt +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zlib:zlib
33
   URL:=http://rsync.samba.org/
33
   URL:=http://rsync.samba.org/
34
   MENU:=1
34
   MENU:=1
35
 endef
35
 endef
38
 	source "$(SOURCE)/Config.in"
38
 	source "$(SOURCE)/Config.in"
39
 endef
39
 endef
40
 
40
 
41
+CONFIGURE_ARGS += \
42
+	--with-included-popt=no \
43
+	--disable-debug \
44
+	--disable-locale \
45
+
41
 ifeq ($(CONFIG_RSYNC_xattr),y)
46
 ifeq ($(CONFIG_RSYNC_xattr),y)
42
 	CONFIGURE_ARGS+= --enable-xattr-support
47
 	CONFIGURE_ARGS+= --enable-xattr-support
43
 else
48
 else
50
 	CONFIGURE_ARGS+= --disable-acl-support
55
 	CONFIGURE_ARGS+= --disable-acl-support
51
 endif
56
 endif
52
 
57
 
58
+ifeq ($(CONFIG_RSYNC_zlib),y)
59
+	CONFIGURE_ARGS+= --with-included-zlib=no
60
+else
61
+	CONFIGURE_ARGS+= --with-included-zlib=yes
62
+endif
63
+
53
 define Package/rsyncd
64
 define Package/rsyncd
54
   SECTION:=net
65
   SECTION:=net
55
   CATEGORY:=Network
66
   CATEGORY:=Network
69
  between two sets of files across the network link.
80
  between two sets of files across the network link.
70
 endef
81
 endef
71
 
82
 
72
-CONFIGURE_ARGS += \
73
-	--with-included-popt=no \
74
-	--with-included-zlib=no \
75
-	--disable-debug \
76
-	--disable-locale \
77
-
78
 define Package/rsync/install
83
 define Package/rsync/install
79
 	$(INSTALL_DIR) $(1)/usr/bin
84
 	$(INSTALL_DIR) $(1)/usr/bin
80
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
85
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/