OBS User unknown 2009-05-05 16:12:37 +00:00 committed by Git OBS Bridge
parent 00b3aca618
commit d6b6c18fa5
4 changed files with 110 additions and 1 deletions

View File

@ -0,0 +1,98 @@
diff -Naurp rsync-3.0.6pre1/clientserver.c rsync-3.0.6pre1-slp//clientserver.c
--- rsync-3.0.6pre1/clientserver.c 2009-05-05 14:24:50.000000000 +0200
+++ rsync-3.0.6pre1-slp//clientserver.c 2009-05-05 14:29:01.000000000 +0200
@@ -1065,7 +1065,7 @@ int daemon_main(void)
* local address??? */
#ifdef HAVE_LIBSLP
- if (register_services()) {
+ if (lp_use_slp() && register_services() != 0) {
rprintf(FINFO,
"Couldn't register with service discovery protocol, continuing anyway\n");
}
diff -Naurp rsync-3.0.6pre1/loadparm.c rsync-3.0.6pre1-slp//loadparm.c
--- rsync-3.0.6pre1/loadparm.c 2009-05-05 14:24:50.000000000 +0200
+++ rsync-3.0.6pre1-slp//loadparm.c 2009-05-05 14:29:01.000000000 +0200
@@ -112,6 +112,10 @@ typedef struct
#ifdef HAVE_LIBSLP
int slp_refresh;
#endif
+
+#ifdef HAVE_LIBSLP
+ BOOL use_slp;
+#endif
} global;
static global Globals;
@@ -307,6 +311,9 @@ static struct parm_struct parm_table[] =
{"slp refresh", P_INTEGER,P_GLOBAL,&Globals.slp_refresh, NULL,0},
#endif
{"socket options", P_STRING, P_GLOBAL,&Globals.socket_options, NULL,0},
+#ifdef HAVE_LIBSLP
+ {"use slp", P_BOOL, P_GLOBAL,&Globals.use_slp, NULL,0},
+#endif
{"auth users", P_STRING, P_LOCAL, &sDefault.auth_users, NULL,0},
{"charset", P_STRING, P_LOCAL, &sDefault.charset, NULL,0},
@@ -360,6 +367,7 @@ static struct parm_struct parm_table[] =
static void init_globals(void)
{
memset(&Globals, 0, sizeof Globals);
+ Globals.use_slp = True;
}
/***************************************************************************
@@ -404,6 +412,10 @@ FN_GLOBAL_INTEGER(lp_rsync_port, &Global
FN_GLOBAL_INTEGER(lp_slp_refresh, &Globals.slp_refresh)
#endif
+#ifdef HAVE_LIBSLP
+FN_GLOBAL_BOOL(lp_use_slp, &Globals.use_slp)
+#endif
+
FN_LOCAL_STRING(lp_auth_users, auth_users)
FN_LOCAL_STRING(lp_charset, charset)
FN_LOCAL_STRING(lp_comment, comment)
diff -Naurp rsync-3.0.6pre1/rsyncd.conf.yo rsync-3.0.6pre1-slp//rsyncd.conf.yo
--- rsync-3.0.6pre1/rsyncd.conf.yo 2009-05-05 14:24:50.000000000 +0200
+++ rsync-3.0.6pre1-slp//rsyncd.conf.yo 2009-05-05 14:54:01.000000000 +0200
@@ -104,6 +104,10 @@ details on some of the options you may b
special socket options are set. These settings can also be specified
via the bf(--sockopts) command-line option.
+dit(bf(use slp)) This parameter is used to determine if the module names are
+advertised via slp. The default is for this to be enabled, which will
+advertise your public modules.
+
dit(bf(slp refresh)) This parameter is used to determine how long service
advertisements are valid (measured in seconds), and is only applicable if
you have Service Location Protocol support compiled in. If this is
diff -Naurp rsync-3.0.6pre1/rsyncd.conf.5 rsync-3.0.6pre1-slp//rsyncd.conf.5
--- rsync-3.0.6pre1/rsyncd.conf.5 2009-05-05 14:24:50.000000000 +0200
+++ rsync-3.0.6pre1-slp//rsyncd.conf.5 2009-05-05 14:55:31.000000000 +0200
@@ -121,7 +121,12 @@ details on some of the options you may b
special socket options are set. These settings can also be specified
via the \fB\-\-sockopts\fP command-line option.
.IP
-.IP "\fBslp refresh\fP"
+.IP "\fBuse slp\fP"
+This parameter is used to determine if the module names are
+advertised via slp. The default is for this to be enabled, which will
+advertise your public modules.
+.IP
+.IP "\fBslp refresh\fP"
This parameter is used to determine how long service
advertisements are valid (measured in seconds), and is only applicable if
you have Service Location Protocol support compiled in. If this is
diff -Naurp rsync-3.0.6pre1/socket.c rsync-3.0.6pre1-slp//socket.c
--- rsync-3.0.6pre1/socket.c 2009-05-05 14:24:50.000000000 +0200
+++ rsync-3.0.6pre1-slp//socket.c 2009-05-05 14:29:01.000000000 +0200
@@ -532,7 +532,7 @@ void start_accept_loop(int port, int (*f
int *sp, maxfd, i;
#ifdef HAVE_LIBSLP
time_t next_slp_refresh;
- short slp_timeout = lp_slp_refresh();
+ short slp_timeout = lp_use_slp() ? lp_slp_refresh() : 0;
if (slp_timeout) {
if (slp_timeout < SLP_MIN_TIMEOUT)
slp_timeout = SLP_MIN_TIMEOUT;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 5 15:29:12 CEST 2009 - puzel@suse.cz
- add rsync-allow-slp-disable.patch (FATE#306331)
-------------------------------------------------------------------
Thu Apr 16 12:16:41 CEST 2009 - puzel@suse.cz

View File

@ -32,7 +32,7 @@ Group: Productivity/Networking/Other
PreReq: %fillup_prereq %insserv_prereq sed grep
AutoReqProv: on
Version: 3.0.5.91
Release: 1
Release: 2
%define tar_version 3.0.6pre1
Summary: Replacement for RCP/mirror that has Many More Features
Source: %{name}-%{tar_version}.tar.bz2
@ -46,6 +46,8 @@ Source7: rsync-server.firewall
Patch3: system-zlib.diff
#PATCH-FIX-UPSTREAM rsync-3.0.5-doc-fix.patch bnc487591 petr.uzel@suse.cz -- based on upstream changes to rsync.yo
Patch4: rsync-3.0.5-doc-fix.patch
#PATCH-FEATURE-UPSTREAM rsync-allow-slp-disable.patch fate#306331 -- taken from upstream git
Patch5: rsync-allow-slp-disable.patch
Url: http://rsync.samba.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define with_system_zlib 0
@ -78,6 +80,7 @@ patch -p1 < patches/acls.diff
patch -p1 < patches/xattrs.diff
patch -p1 < patches/slp.diff
%patch4 -p1
%patch5 -p1
%build
autoheader
@ -140,6 +143,8 @@ fi
%doc COPYING NEWS README tech_report.ps tech_report.tex
%changelog
* Tue May 05 2009 puzel@suse.cz
- add rsync-allow-slp-disable.patch (FATE#306331)
* Thu Apr 16 2009 puzel@suse.cz
- update to 3.0.6pre1 (bugfix release)
- noteworthy changes:

View File

@ -7,6 +7,7 @@ log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
hosts allow = trusted.hosts
slp refresh = 300
use slp = false
#[Example]
# path = /home/Example