Rename libiscsi to libiscsiclient to avoid clash with obscure linux library
Change to version 2
This commit is contained in:
22
Makefile.am
22
Makefile.am
@@ -4,10 +4,10 @@ ACLOCAL_AMFLAGS =-I m4
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
AM_CPPFLAGS=-I. -I$(srcdir)/include "-D_U_=__attribute__((unused))"
|
||||
AM_CFLAGS=$(WARN_CFLAGS)
|
||||
LDADD = lib/libiscsi.la -lpopt
|
||||
LDADD = lib/libiscsiclient.la -lpopt
|
||||
|
||||
EXTRA_DIST = autogen.sh COPYING.LESSER \
|
||||
packaging/RPM/libiscsi.spec.in packaging/RPM/makerpms.sh
|
||||
packaging/RPM/libiscsiclient.spec.in packaging/RPM/makerpms.sh
|
||||
|
||||
# Simplify conditions below by declaring variables as empty
|
||||
|
||||
@@ -15,24 +15,24 @@ bin_PROGRAMS =
|
||||
noinst_PROGRAMS =
|
||||
EXTRA_PROGRAMS =
|
||||
|
||||
# libiscsi shared library
|
||||
# libiscsiclient shared library
|
||||
|
||||
iscsi_includedir = $(includedir)/iscsi
|
||||
dist_iscsi_include_HEADERS = include/iscsi.h include/scsi-lowlevel.h
|
||||
dist_noinst_HEADERS = include/iscsi-private.h include/md5.h include/slist.h
|
||||
|
||||
lib_LTLIBRARIES = lib/libiscsi.la
|
||||
lib_libiscsi_la_SOURCES = \
|
||||
lib_LTLIBRARIES = lib/libiscsiclient.la
|
||||
lib_libiscsiclient_la_SOURCES = \
|
||||
lib/connect.c lib/crc32c.c lib/discovery.c lib/init.c \
|
||||
lib/login.c lib/md5.c lib/nop.c lib/pdu.c lib/scsi-command.c \
|
||||
lib/scsi-lowlevel.c lib/socket.c lib/sync.c lib/task_mgmt.c
|
||||
|
||||
SONAME=$(firstword $(subst ., ,$(VERSION)))
|
||||
SOREL=$(shell printf "%d%02d%02d" $(subst ., ,$(VERSION)))
|
||||
lib_libiscsi_la_LDFLAGS = \
|
||||
lib_libiscsiclient_la_LDFLAGS = \
|
||||
-version-info $(SONAME):$(SOREL):0 -bindir $(bindir) -no-undefined
|
||||
|
||||
# libiscsi utilities
|
||||
# libiscsiclient utilities
|
||||
|
||||
if PROGRAMS
|
||||
bin_PROGRAMS += bin/iscsi-inq bin/iscsi-ls
|
||||
@@ -47,7 +47,7 @@ bin_iscsiclient_SOURCES = examples/iscsiclient.c
|
||||
EXTRA_PROGRAMS += bin/iscsi-dd
|
||||
bin_iscsi_dd_SOURCES = examples/iscsi-dd.c
|
||||
|
||||
# libiscsi test tool
|
||||
# libiscsiclient test tool
|
||||
|
||||
noinst_PROGRAMS += bin/iscsi-test
|
||||
dist_noinst_HEADERS += test-tool/iscsi-test.h
|
||||
@@ -78,9 +78,9 @@ bin_ld_iscsi_SOURCES = src/ld_iscsi.c
|
||||
bin_ld_iscsi_CFLAGS = $(AM_CFLAGS) -fPIC
|
||||
|
||||
# 2) let libtool link in the static version of the library
|
||||
noinst_LTLIBRARIES = lib/libiscsi_convenience.la
|
||||
lib_libiscsi_convenience_la_SOURCES = $(lib_libiscsi_la_SOURCES)
|
||||
bin/ld_iscsi.o: src/bin_ld_iscsi-ld_iscsi.o lib/libiscsi_convenience.la
|
||||
noinst_LTLIBRARIES = lib/libiscsiclient_convenience.la
|
||||
lib_libiscsiclient_convenience_la_SOURCES = $(lib_libiscsiclient_la_SOURCES)
|
||||
bin/ld_iscsi.o: src/bin_ld_iscsi-ld_iscsi.o lib/libiscsiclient_convenience.la
|
||||
$(LIBTOOL) --mode=link $(CC) -o $@ $^
|
||||
|
||||
# 3) Manually create the .so file.
|
||||
|
||||
22
configure.ac
22
configure.ac
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(libiscsi, m4_esyscmd([grep 'Version:' ./packaging/RPM/libiscsi.spec.in 2>/dev/null | head -1 | sed -e 's/[ \t]*Version:[ \t]*\([^ \t]*\)[ \t]*.*/\1/' | tr -d '\n']))
|
||||
AC_INIT(libiscsiclient, m4_esyscmd([grep 'Version:' ./packaging/RPM/libiscsiclient.spec.in 2>/dev/null | head -1 | sed -e 's/[ \t]*Version:[ \t]*\([^ \t]*\)[ \t]*.*/\1/' | tr -d '\n']))
|
||||
AC_CONFIG_SRCDIR([lib/init.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
@@ -28,32 +28,32 @@ AC_SUBST(WARN_CFLAGS)
|
||||
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_CACHE_CHECK([for sin_len in sock],libiscsi_cv_HAVE_SOCK_SIN_LEN,[
|
||||
AC_CACHE_CHECK([for sin_len in sock],libiscsiclient_cv_HAVE_SOCK_SIN_LEN,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>],
|
||||
[struct sockaddr_in sock; sock.sin_len = sizeof(sock);],
|
||||
libiscsi_cv_HAVE_SOCK_SIN_LEN=yes,libiscsi_cv_HAVE_SOCK_SIN_LEN=no)])
|
||||
if test x"$libiscsi_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
|
||||
libiscsiclient_cv_HAVE_SOCK_SIN_LEN=yes,libiscsiclient_cv_HAVE_SOCK_SIN_LEN=no)])
|
||||
if test x"$libiscsiclient_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
|
||||
AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for tcp keepalive],libiscsi_cv_HAVE_TCP_KEEPALIVE,[
|
||||
AC_CACHE_CHECK([for tcp keepalive],libiscsiclient_cv_HAVE_TCP_KEEPALIVE,[
|
||||
AC_TRY_COMPILE([#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>],
|
||||
[int foo = TCP_KEEPCNT + TCP_KEEPIDLE + TCP_KEEPINTVL],
|
||||
libiscsi_cv_HAVE_TCP_KEEPALIVE=yes,libiscsi_cv_HAVE_TCP_KEEPALIVE=no)])
|
||||
if test x"$libiscsi_cv_HAVE_TCP_KEEPALIVE" = x"yes"; then
|
||||
libiscsiclient_cv_HAVE_TCP_KEEPALIVE=yes,libiscsiclient_cv_HAVE_TCP_KEEPALIVE=no)])
|
||||
if test x"$libiscsiclient_cv_HAVE_TCP_KEEPALIVE" = x"yes"; then
|
||||
AC_DEFINE(HAVE_TCP_KEEPALIVE,1,[Whether we have support for tcp keepalive socket options])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for sys filio.h],libiscsi_cv_NEED_SYS_FILIO_H,[
|
||||
AC_CACHE_CHECK([for sys filio.h],libiscsiclient_cv_NEED_SYS_FILIO_H,[
|
||||
AC_TRY_COMPILE([#include <stdint.h>
|
||||
#include <sys/filio.h>],
|
||||
[int foo = FIONREAD],
|
||||
libiscsi_cv_NEED_SYS_FILIO_H=yes,libiscsi_cv_NEED_SYS_FILIO_H=no)])
|
||||
if test x"$libiscsi_cv_NEED_SYS_FILIO_H" = x"yes"; then
|
||||
libiscsiclient_cv_NEED_SYS_FILIO_H=yes,libiscsiclient_cv_NEED_SYS_FILIO_H=no)])
|
||||
if test x"$libiscsiclient_cv_NEED_SYS_FILIO_H" = x"yes"; then
|
||||
AC_DEFINE(NEED_SYS_FILIO_H,1,[Whether we need sys/filio.h])
|
||||
fi
|
||||
|
||||
@@ -86,7 +86,7 @@ if test "$ac_cv_have_popt" = yes ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_NOTICE(You need libpopt to compile the sample libiscsi clients.)
|
||||
AC_MSG_NOTICE(You need libpopt to compile the sample libiscsiclient clients.)
|
||||
AC_MSG_NOTICE(Only the library will be compiled and installed.)
|
||||
fi
|
||||
AM_CONDITIONAL(PROGRAMS, [test "$ac_cv_have_popt" = yes])
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Name: libiscsi
|
||||
Name: libiscsiclient
|
||||
Summary: iSCSI client library
|
||||
Version: 1.1.0
|
||||
Version: 2.0.0
|
||||
Release: 1GITHASH%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: https://github.com/sahlberg/libiscsi
|
||||
|
||||
Source: libiscsi-%{version}.tar.gz
|
||||
Source: libiscsiclient-%{version}.tar.gz
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: autoconf
|
||||
@@ -15,7 +15,7 @@ BuildRequires: libtool
|
||||
BuildRequires: popt-devel
|
||||
|
||||
%description
|
||||
libiscsi is a library for attaching to iSCSI resources across
|
||||
libiscsiclient is a library for attaching to iSCSI resources across
|
||||
a network.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ a network.
|
||||
%prep
|
||||
%setup -q
|
||||
# setup the init script and sysconfig file
|
||||
%setup -T -D -n libiscsi-%{version} -q
|
||||
%setup -T -D -n libiscsiclient-%{version} -q
|
||||
|
||||
%build
|
||||
|
||||
@@ -43,8 +43,8 @@ make %{?_smp_mflags}
|
||||
# Clean up in case there is trash left from a previous build
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install %{?_smp_mflags}
|
||||
rm $RPM_BUILD_ROOT/%{_libdir}/libiscsi.a
|
||||
rm $RPM_BUILD_ROOT/%{_libdir}/libiscsi.la
|
||||
rm $RPM_BUILD_ROOT/%{_libdir}/libiscsiclient.a
|
||||
rm $RPM_BUILD_ROOT/%{_libdir}/libiscsiclient.la
|
||||
|
||||
# Remove "*.old" files
|
||||
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
|
||||
@@ -59,14 +59,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING.LESSER README TODO
|
||||
%{_libdir}/libiscsi.so.*
|
||||
%{_libdir}/libiscsiclient.so.*
|
||||
|
||||
%package utils
|
||||
Summary: iSCSI Client Utilities
|
||||
Group: Applications/System
|
||||
|
||||
%description utils
|
||||
The libiscsi-utils package provides a set of assorted utilities to connect
|
||||
The libiscsiclient-utils package provides a set of assorted utilities to connect
|
||||
to iSCSI servers without having to set up the Linux iSCSI initiator.
|
||||
|
||||
%files utils
|
||||
@@ -78,19 +78,21 @@ to iSCSI servers without having to set up the Linux iSCSI initiator.
|
||||
%package devel
|
||||
Summary: iSCSI client development libraries
|
||||
Group: Development/Libraries
|
||||
Requires: libiscsi = %{version}-%{release}
|
||||
Requires: libiscsiclient = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The libiscsi-devel package includes the header files for libiscsi.
|
||||
The libiscsiclient-devel package includes the header files for libiscsiclient.
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING.LESSER README TODO
|
||||
%{_includedir}/iscsi/iscsi.h
|
||||
%{_includedir}/iscsi/scsi-lowlevel.h
|
||||
%{_libdir}/libiscsi.so
|
||||
%{_libdir}/libiscsiclient.so
|
||||
|
||||
%changelog
|
||||
* Sat Mar 3 2012 : 2.0.0
|
||||
- Rename to libiscsiclient to avoid collission with obscure linux library
|
||||
* Sun Dec 25 2011 : 1.1.0
|
||||
- Fix TaskManagement AbortTask/AbortTaskSet to send to correct LUN
|
||||
|
||||
@@ -40,8 +40,8 @@ TOPDIR=${DIRNAME}/../..
|
||||
SPECDIR=`rpm --eval %_specdir`
|
||||
SRCDIR=`rpm --eval %_sourcedir`
|
||||
|
||||
SPECFILE="libiscsi.spec"
|
||||
SPECFILE_IN="libiscsi.spec.in"
|
||||
SPECFILE="libiscsiclient.spec"
|
||||
SPECFILE_IN="libiscsiclient.spec.in"
|
||||
RPMBUILD="rpmbuild"
|
||||
|
||||
GITHASH=".$(git log --pretty=format:%h -1)"
|
||||
@@ -64,7 +64,7 @@ else
|
||||
fi
|
||||
|
||||
pushd ${TOPDIR}
|
||||
echo -n "Creating libiscsi-${VERSION}.tar.gz ... "
|
||||
echo -n "Creating libiscsiclient-${VERSION}.tar.gz ... "
|
||||
sh autogen.sh
|
||||
make dist GZIP_ENV="\"$GZIP_ENV\""
|
||||
RC=$?
|
||||
@@ -80,7 +80,7 @@ fi
|
||||
##
|
||||
## copy additional source files
|
||||
##
|
||||
cp -p ${TOPDIR}/libiscsi-${VERSION}.tar.gz ${SRCDIR}
|
||||
cp -p ${TOPDIR}/libiscsiclient-${VERSION}.tar.gz ${SRCDIR}
|
||||
cp -p ${DIRNAME}/${SPECFILE} ${SPECDIR}
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user