From 6270379f8e8f94db6c8774a37639d805f3c9bd3d Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 11 Feb 2008 22:16:36 +0000 Subject: [PATCH] Initial isns-utils commit. --- .cvsignore | 1 + ...-utils-fix-non-utf8-chars-in-copying.patch | 20 ++++ ...ils-turn-default-dd-on-to-match-msft.patch | 13 +++ isns-utils-update-isnsadm-man.patch | 12 +++ isns-utils.spec | 98 +++++++++++++++++++ isnsd.init | 78 +++++++++++++++ sources | 1 + 7 files changed, 223 insertions(+) create mode 100644 isns-utils-fix-non-utf8-chars-in-copying.patch create mode 100644 isns-utils-turn-default-dd-on-to-match-msft.patch create mode 100644 isns-utils-update-isnsadm-man.patch create mode 100644 isns-utils.spec create mode 100644 isnsd.init diff --git a/.cvsignore b/.cvsignore index e69de29..8a142b4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +open-isns-0.91.tar.bz2 diff --git a/isns-utils-fix-non-utf8-chars-in-copying.patch b/isns-utils-fix-non-utf8-chars-in-copying.patch new file mode 100644 index 0000000..26197c2 --- /dev/null +++ b/isns-utils-fix-non-utf8-chars-in-copying.patch @@ -0,0 +1,20 @@ +--- open-isns-20070927.orig//COPYING 2008-01-17 17:28:45.000000000 -0600 ++++ open-isns-20070927/COPYING 2008-01-17 17:37:24.000000000 -0600 +@@ -1,7 +1,7 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + +- Copyright © 1991, 1999 Free Software Foundation, Inc. ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +@@ -471,7 +471,7 @@ convey the exclusion of warranty; and ea + "copyright" line and a pointer to where the full notice is found. + + +- Copyright © ++ Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public diff --git a/isns-utils-turn-default-dd-on-to-match-msft.patch b/isns-utils-turn-default-dd-on-to-match-msft.patch new file mode 100644 index 0000000..201b1de --- /dev/null +++ b/isns-utils-turn-default-dd-on-to-match-msft.patch @@ -0,0 +1,13 @@ +diff -aurp open-isns-0.91.orig/etc/isnsd.conf open-isns-0.91/etc/isnsd.conf +--- open-isns-0.91.orig/etc/isnsd.conf 2008-01-18 10:24:46.000000000 -0600 ++++ open-isns-0.91/etc/isnsd.conf 2008-01-18 10:25:13.000000000 -0600 +@@ -40,7 +40,7 @@ RegistrationPeriod = 10m + # create a virtual "default discovery domain", which + # holds all nodes that are not part of any administratively + # configured discovery domain. +-DefaultDiscoveryDomain = 0 ++DefaultDiscoveryDomain = 1 + + # Authentication enable/disable. + # When set to 1, the client will sign +Only in open-isns-0.91/etc: isnsd.conf.orig diff --git a/isns-utils-update-isnsadm-man.patch b/isns-utils-update-isnsadm-man.patch new file mode 100644 index 0000000..b25b851 --- /dev/null +++ b/isns-utils-update-isnsadm-man.patch @@ -0,0 +1,12 @@ +diff -aurp open-isns-20070927.orig/doc/isnsadm.8 open-isns-20070927/doc/isnsadm.8 +--- open-isns-20070927.orig/doc/isnsadm.8 2007-09-18 05:23:22.000000000 -0500 ++++ open-isns-20070927/doc/isnsadm.8 2008-01-15 01:47:52.000000000 -0600 +@@ -44,7 +44,7 @@ By default, + .B isnsadm + will take most of its settings from the configuration + file +-.BR /etc/isns/client.conf , ++.BR /etc/isns/isnsadm.conf , + with the exception of the following options: + .TP + .BI \--config " filename\fR, " \-c " filename diff --git a/isns-utils.spec b/isns-utils.spec new file mode 100644 index 0000000..756629c --- /dev/null +++ b/isns-utils.spec @@ -0,0 +1,98 @@ +Name: isns-utils +Version: 0.91 +Release: 0.0%{?dist} +Summary: The iSNS daemon and utility programs + +Group: System Environment/Daemons +License: LGPLv2+ +URL: http://oss.oracle.com/~okir/open-isns/ +Source0: http://oss.oracle.com/~okir/open-isns/open-isns-%{version}.tar.bz2 +Source1: isnsd.init +Patch0: isns-utils-turn-default-dd-on-to-match-msft.patch +Patch1: isns-utils-update-isnsadm-man.patch +Patch2: isns-utils-fix-non-utf8-chars-in-copying.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: openssl-devel automake pkgconfig +Requires: /sbin/chkconfig /sbin/service + +%description +The iSNS package contains the daemon and tools to setup a iSNS server, +and iSNS client tools. The Internet Storage Name Service (iSNS) protocol +allows automated discovery, management and configuration of iSCSI and +Fibre Channel devices (using iFCP gateways) on a TCP/IP network. + +%prep +%setup -q -n open-isns-%{version} +%patch0 -p1 -b .turn-default-dd-on-to-match-msft +%patch1 -p1 -b .update-isnsadm-man +%patch2 -p1 -b .fix-non-utf8-chars-in-copying + +%build +if pkg-config openssl ; then + CPPFLAGS=$(pkg-config --cflags openssl) ; export CPPFLAGS + LDFLAGS=$(pkg-config --libs openssl) ; export LDFLAGS +fi + +autoconf +autoheader +%{configure} +%{__sed} -i -e 's|-Wall -g -O2|%{optflags}|' Makefile +%{__make} %{?_smp_mflags} + + +%install +%{__rm} -rf %{buildroot} +%{__install} -d %{buildroot}%{_sbindir} +%{__install} -d %{buildroot}%{_mandir}/man8 +%{__install} -d %{buildroot}%{_mandir}/man5 +%{__install} -d %{buildroot}%{_initrddir} +%{__install} -d %{buildroot}%{_sysconfdir}/isns +%{__install} -d %{buildroot}%{_var}/lib +%{__install} -d %{buildroot}%{_var}/lib/isns + +%{__install} -p -m 644 etc/isnsd.conf %{buildroot}%{_sysconfdir}/isns/isnsd.conf +%{__install} -p -m 644 etc/isnsdd.conf %{buildroot}%{_sysconfdir}/isns/isnsdd.conf +%{__install} -p -m 644 etc/isnsadm.conf %{buildroot}%{_sysconfdir}/isns/isnsadm.conf + +%{__install} -p -m 755 isnsd isnsdd isnsadm isnssetup %{buildroot}%{_sbindir} +%{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/isnsd +%{__install} -p -m 644 doc/isns_config.5 %{buildroot}/%{_mandir}/man5/ +%{__install} -p -m 644 doc/isnsd.8 doc/isnsdd.8 doc/isnsadm.8 %{buildroot}/%{_mandir}/man8/ + + +%post +/sbin/chkconfig --add isnsd + +%postun +if [ "$1" = "1" ] ; then + /sbin/service isnsd condrestart > /dev/null 2>&1 +fi + +%preun +if [ "$1" = "0" ] ; then + /sbin/chkconfig isnsd stop > /dev/null 2>&1 + /sbin/chkconfig --del isnsd +fi + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%doc COPYING README +%{_sbindir}/isnsd +%{_sbindir}/isnsadm +%{_sbindir}/isnsdd +%{_sbindir}/isnssetup +%{_mandir}/man8/* +%{_mandir}/man5/* +%{_initrddir}/isnsd +%dir %{_sysconfdir}/isns +%dir %{_var}/lib/isns +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/isns/* + +%changelog +* Wed Jan 16 2008 Mike Christie - 0.91-0.0 +- first build diff --git a/isnsd.init b/isnsd.init new file mode 100644 index 0000000..acc8c1b --- /dev/null +++ b/isnsd.init @@ -0,0 +1,78 @@ +#!/bin/sh +# +# open-isns isnsd init script +# # Copyright (C) 2007 Albert Pauw +# +# chkconfig: - 39 35 +# +### BEGIN INIT INFO +# Provides: isnsd +# Required-Start: $network +# Short-Description: Starts and stops the generic iSNS daemon +# Description: isnsd provides a iSNS daemon and iSNS management tools. +### END INIT INFO +# +# +# pidfile: /var/run/isns.pid + +# Source function library. +. /etc/init.d/functions + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +RETVAL=0 + +start() +{ + echo -n "Starting iSNS Server:" + daemon isnsd + echo + RETVAL=$? + if [ $RETVAL -eq "0" ]; then + touch /var/lock/subsys/isnsd + fi +} + +stop() +{ + echo -n "Stopping iSNS Server: " + if [ ! -f /var/lock/subsys/isnsd ]; then + echo + success + return + fi + + killproc isnsd + echo + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/isnsd +} + +restart() +{ + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status isnsd + RETVAL=$? + ;; + condrestart) + [ -f /var/lock/subsys/isnsd ] && restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/sources b/sources index e69de29..7944f65 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +27d512380511428409a5438ca789ab0d open-isns-0.91.tar.bz2