2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 17:11:45 +00:00

Initial OpenSLP version

This commit is contained in:
sakolish 2008-09-10 20:01:01 +00:00
parent 2deb027dfe
commit 09f69945e0
5 changed files with 1271 additions and 0 deletions

50
OpenSLP/Build-notes Normal file
View File

@ -0,0 +1,50 @@
Build Notes
1) Download openslp-1.2.1.tar.gz from http://openslp.org/download.html and copy to /tmp/openslp directory.
2) cd /tmp/openslp
3) gunzip openslp-1.2.1.tar.gz
4) tar xvf openslp-1.2.1.tar
5) Copy openslp.spec to /tmp/openslp/openslp-1.2.1
6) tar cvf openslp-1.2.1.tar openslp-1.2.1
7) gzip openslp-1.2.1.tar
8) Copy openslp-1.2.1.tar.gz to /usr/src/packages/SOURCES
9) Copy openslp-conf.patch, openslp-network.patch, and openslp-attr.patch to /usr/src/packages/SOURCES
10) cd /usr/src/packages/SPECS
11) Run "rpmbuild -ta /usr/src/packages/SOURCES/openslp-1.2.1.tar.gz", which creates:
/usr/src/packages/RPMS/i586/openslp-1.2.1-1.i586.rpm
NOTE #1
This package is installed to /usr/local so as to not interfer
with other versions of OpenSLP that may already be installed.
For example, SUSE LINUX Enterprise Server 9 comes w/ OpenSLP 1.1.5
SUSE OpenSLP 1.1.5 Dependencies
libslp.so.1 is needed by (installed) openwbem-3.1.0-0.18
libslp.so.1 is needed by (installed) pwdutils-2.6.4-2.25
libslp.so.1 is needed by (installed) openldap2-2.2.24-4.12
libslp.so.1 is needed by (installed) yast2-packagemanager-2.9.67-0.3.1
libslp.so.1 is needed by (installed) yast2-core-2.9.97-0.3
libslp.so.1 is needed by (installed) yast2-slp-2.9.11-0.3
libslp.so.1 is needed by (installed) smpppd-1.16-5.1
libslp.so.1 is needed by (installed) cups-1.1.20-108.26
libslp.so.1 is needed by (installed) ypserv-2.12.1-44.5
libslp.so.1 is needed by (installed) ypbind-1.18-1.7
libslp.so.1 is needed by (installed) kdebase3-3.2.1-68.46
libslp.so.1 is needed by (installed) kinternet-0.63-20.1
libslp.so.1 is needed by (installed) kio_slp-0.4-33.1
libslp.so.1 is needed by (installed) kdenetwork3-vnc-3.2.1-50.7
libslp.so.1 is needed by (installed) qinternet-0.63-20.1
libslp.so.1 is needed by (installed) cyrus-imapd-2.2.3-83.35
NOTE #2
HOW TO CREATE THESE PATCHES
1) cd /tmp/openslp-1.2.1
2) mkdir a (this directory contains the original file)
3) Copy original file to "a" subdirectory
4) Repeat above for directory "b" (this directory contains the changed file)
5) Copy changed file to "b" subdirectory
6) cd /tmp/openslp-1.2.1
7) diff -uNr a b > openslp.patch

1072
OpenSLP/openslp-attr.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
diff -uNr a/etc/slp.conf b/etc/slp.conf
--- a/etc/slp.conf 2008-08-29 13:56:11.689444000 -0400
+++ b/etc/slp.conf 2008-08-29 13:55:52.804314976 -0400
@@ -61,7 +61,7 @@
# return for a synchronous request before the timeout, or the maximum number
# of results to return through a callback if the request results are
# reported asynchronously (default value is 256).
-;net.slp.maxResults = 256
+net.slp.maxResults = 2000
#----------------------------------------------------------------------------
@@ -76,13 +76,13 @@
# A boolean indicating whether passive DA detection should be used.
# Default is true. Uncomment the following line to disable passive DA
# detection
-;net.slp.passiveDADetection = false
+net.slp.passiveDADetection = false
# A boolean indicating whether active DA detection should be used. This is
# useful when the DAs available are explicitly restricted to those obtained
# from DHCP or the net.slp.DAAddresses property. Default is true. Uncomment
# the following line to disable active DA detection
-;net.slp.activeDADetection = false
+net.slp.activeDADetection = false
# The net.slp.DAActiveDiscoveryInterval property controls *periodic*
# transmission of active DA discovery SrvRqsts. The default setting
@@ -140,7 +140,7 @@
;net.slp.randomWaitBound = 5000
# A integer giving the network packet MTU in bytes. (Default is 1400)
-;net.slp.MTU = 1400
+net.slp.MTU = 32767
# A list of IP address of network interfaces on which the DA/SA should listen
# for slp requests. By default, slpd will use all interfaces.
--- a/libslp/libslp.h 2008-08-25 15:33:58.745701832 -0400
+++ b/libslp/libslp.h 2008-08-25 15:35:02.826960000 -0400
@@ -101,7 +101,7 @@
#define LIBSLP_CONFFILE "%WINDIR%\\slp.conf"
#define LIBSLP_SPIFILE "%WINDIR%\\slp.spi"
#else
-#define LIBSLP_CONFFILE "/etc/slp.conf"
+#define LIBSLP_CONFFILE "/usr/local/etc/slp.conf"
#define LIBSLP_SPIFILE "/etc/slp.spi"
#endif
#endif

View File

@ -0,0 +1,52 @@
diff -uNr a/libslp/libslp_network.c b/libslp/libslp_network.c
--- a/libslp/libslp_network.c 2008-08-29 14:07:28.755514312 -0400
+++ b/libslp/libslp_network.c 2008-08-29 14:07:06.563887952 -0400
@@ -389,10 +389,8 @@
/*--------------------------*/
/* Main retransmission loop */
/*--------------------------*/
- while(xmitcount <= MAX_RETRANSMITS)
+ while(xmitcount < MAX_RETRANSMITS)
{
- xmitcount++;
-
/*--------------------*/
/* setup recv timeout */
/*--------------------*/
@@ -412,6 +410,7 @@
timeout.tv_sec = maxwait / 1000;
timeout.tv_usec = (maxwait % 1000) * 1000;
}
+ xmitcount++;
/*------------------------------------------------------------------*/
/* re-allocate buffer and make sure that the send buffer does not */
@@ -722,7 +721,7 @@
result = SLP_NETWORK_ERROR;
goto FINISHED;
}
- usebroadcast = SLPPropertyAsBoolean(SLPGetProperty("net.slp.useBroadcast"));
+ usebroadcast = SLPPropertyAsBoolean(SLPGetProperty("net.slp.isBroadcastOnly"));
/*-----------------------------------*/
/* Multicast/broadcast wait timeouts */
@@ -765,10 +764,8 @@
/* Main retransmission loop */
/*--------------------------*/
xmitcount = 0;
- while(xmitcount <= MAX_RETRANSMITS)
+ while(xmitcount < MAX_RETRANSMITS)
{
- xmitcount++;
-
totaltimeout += timeouts[xmitcount];
if(totaltimeout >= maxwait || timeouts[xmitcount] == 0)
{
@@ -777,6 +774,7 @@
}
timeout.tv_sec = timeouts[xmitcount] / 1000;
timeout.tv_usec = (timeouts[xmitcount] % 1000) * 1000;
+ xmitcount++;
/*------------------------------------------------------------------*/
/* re-allocate buffer and make sure that the send buffer does not */

49
OpenSLP/openslp.spec Normal file
View File

@ -0,0 +1,49 @@
%define pkg openslp
%define ver 1.2.1
# what red hat (or other distibution) version are you running?
%define distver 1
Summary: Open source implementation of Service Location Protocol V2
Name: %{pkg}
Version: %{ver}
Release: %{distver}
License: BSD
Group: System/Utilities
URL: http:/openslp.sourceforge.net
Source: %{pkg}-%{ver}.tar.gz
Patch0: openslp-conf.patch
Patch1: openslp-attr.patch
Patch2: openslp-network.patch
BuildRoot: %{_tmppath}/%{pkg}-%{ver}-root
Prefix: %{_prefix}
%description
Open source implementation of Service Location Protocol V2
%prep
# Set the path to pick up AIX toolbox patch program
export PATH=/opt/freeware/bin:$PATH
%{__rm} -rf %{buildroot}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure --enable-shared=no
make
%install
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
cp slptool/slptool $RPM_BUILD_ROOT/usr/local/bin
mkdir -p $RPM_BUILD_ROOT/usr/local/etc
cp etc/slp.conf $RPM_BUILD_ROOT/usr/local/etc
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
/usr/local/bin/slptool
/usr/local/etc/slp.conf