Преглед на файлове

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 години
родител
ревизия
0264b06472
променени са 2 файла, в които са добавени 25 реда и са изтрити 7 реда
  1. 13
    0
      net/rsync/Config.in
  2. 12
    7
      net/rsync/Makefile

+ 13
- 0
net/rsync/Config.in Целия файл

@@ -9,4 +9,17 @@ if PACKAGE_rsync
9 9
 		bool
10 10
 		prompt "Enable ACL support"
11 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 25
 endif

+ 12
- 7
net/rsync/Makefile Целия файл

@@ -29,7 +29,7 @@ define Package/rsync
29 29
   CATEGORY:=Network
30 30
   SUBMENU:=File Transfer
31 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 33
   URL:=http://rsync.samba.org/
34 34
   MENU:=1
35 35
 endef
@@ -38,6 +38,11 @@ define Package/rsync/config
38 38
 	source "$(SOURCE)/Config.in"
39 39
 endef
40 40
 
41
+CONFIGURE_ARGS += \
42
+	--with-included-popt=no \
43
+	--disable-debug \
44
+	--disable-locale \
45
+
41 46
 ifeq ($(CONFIG_RSYNC_xattr),y)
42 47
 	CONFIGURE_ARGS+= --enable-xattr-support
43 48
 else
@@ -50,6 +55,12 @@ else
50 55
 	CONFIGURE_ARGS+= --disable-acl-support
51 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 64
 define Package/rsyncd
54 65
   SECTION:=net
55 66
   CATEGORY:=Network
@@ -69,12 +80,6 @@ define Package/rsync/description
69 80
  between two sets of files across the network link.
70 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 83
 define Package/rsync/install
79 84
 	$(INSTALL_DIR) $(1)/usr/bin
80 85
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/