From 72d0c73f9ee7eecdb96c9088e2d2e9742d17eee2baee8a43e5812f7148926cb6 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 10 Nov 2008 03:39:06 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libssh?expand=0&rev=1 --- .gitattributes | 23 ++ .gitignore | 1 + 0001-Map-permission-field-to-type-field.patch | 50 +++ 0002-Add-errno-mapping.patch | 366 ++++++++++++++++++ libssh-0.2.tar.bz2 | 3 + libssh-paths.patch | 53 +++ libssh-rpmlintrc | 1 + libssh.changes | 32 ++ libssh.spec | 179 +++++++++ ready | 0 10 files changed, 708 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Map-permission-field-to-type-field.patch create mode 100644 0002-Add-errno-mapping.patch create mode 100644 libssh-0.2.tar.bz2 create mode 100644 libssh-paths.patch create mode 100644 libssh-rpmlintrc create mode 100644 libssh.changes create mode 100644 libssh.spec create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Map-permission-field-to-type-field.patch b/0001-Map-permission-field-to-type-field.patch new file mode 100644 index 0000000..5e283c5 --- /dev/null +++ b/0001-Map-permission-field-to-type-field.patch @@ -0,0 +1,50 @@ +From a07e57e2ed6d402d1f3d4b8449ee4f4ab2108ce7 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Wed, 20 Aug 2008 18:37:33 +0200 +Subject: [PATCH] Map permission field to type field. + +--- + libssh/sftp.c | 23 +++++++++++++++++++++++ + 1 files changed, 23 insertions(+), 0 deletions(-) + +Index: libssh-0.2/libssh/sftp.c +=================================================================== +--- libssh-0.2.orig/libssh/sftp.c ++++ libssh-0.2/libssh/sftp.c +@@ -24,6 +24,8 @@ MA 02111-1307, USA. */ + + #include + #include ++#include ++#include + #include + #include + #include "libssh/priv.h" +@@ -580,6 +582,27 @@ SFTP_ATTRIBUTES *sftp_parse_attr_3(SFTP_ + if(buffer_get_u32(buf,&attr->permissions)!=sizeof(u32)) + break; + attr->permissions=ntohl(attr->permissions); ++ ++ switch (attr->permissions & S_IFMT) { ++ case S_IFSOCK: ++ case S_IFBLK: ++ case S_IFCHR: ++ case S_IFIFO: ++ attr->type = SSH_FILEXFER_TYPE_SPECIAL; ++ break; ++ case S_IFLNK: ++ attr->type = SSH_FILEXFER_TYPE_SYMLINK; ++ break; ++ case S_IFREG: ++ attr->type = SSH_FILEXFER_TYPE_REGULAR; ++ break; ++ case S_IFDIR: ++ attr->type = SSH_FILEXFER_TYPE_DIRECTORY; ++ break; ++ default: ++ attr->type = SSH_FILEXFER_TYPE_UNKNOWN; ++ break; ++ } + } + if(flags & SSH_FILEXFER_ATTR_ACMODTIME){ + if(buffer_get_u32(buf,&attr->atime)!=sizeof(u32)) diff --git a/0002-Add-errno-mapping.patch b/0002-Add-errno-mapping.patch new file mode 100644 index 0000000..fa148b6 --- /dev/null +++ b/0002-Add-errno-mapping.patch @@ -0,0 +1,366 @@ +From b0b78a34891489b26aaabf71975bed4bc533c9cc Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Wed, 20 Aug 2008 18:38:25 +0200 +Subject: [PATCH] Add errno mapping. + +--- + libssh/sftp.c | 252 ++++++++++++++++++++++++++++++++++++++++++++------------ + 1 files changed, 198 insertions(+), 54 deletions(-) + +Index: libssh-0.2/libssh/sftp.c +=================================================================== +--- libssh-0.2.orig/libssh/sftp.c ++++ libssh-0.2/libssh/sftp.c +@@ -22,6 +22,7 @@ the Free Software Foundation, Inc., 59 T + MA 02111-1307, USA. */ + + ++#include + #include + #include + #include +@@ -393,6 +394,17 @@ SFTP_DIR *sftp_opendir(SFTP_SESSION *sft + sftp_message_free(msg); + if(!status) + return NULL; ++ switch (status->status) { ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_PERMISSION_DENIED: ++ errno = EACCES; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; ++ } + ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); + status_msg_free(status); + return NULL; +@@ -709,10 +721,20 @@ SFTP_ATTRIBUTES *sftp_readdir(SFTP_SESSI + sftp_message_free(msg); + if(!status) + return NULL; +- if(status->status==SSH_FX_EOF){ +- dir->eof=1; ++ switch (status->status) { ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_PERMISSION_DENIED: ++ errno = EACCES; ++ break; ++ case SSH_FX_EOF: ++ dir->eof = 1; + status_msg_free(status); + return NULL; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } + ssh_set_error(sftp->session,SSH_FATAL,"Unknown error status : %d",status->status); + status_msg_free(status); +@@ -789,12 +811,29 @@ static int sftp_handle_close(SFTP_SESSIO + sftp_message_free(msg); + if(!status) + return -1; +- if(status->status != SSH_FX_OK){ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); +- err=-1; ++ switch (status->status) { ++ case SSH_FX_INVALID_HANDLE: ++ errno = EBADF; ++ break; ++#if 0 ++ case SSH_FX_NO_SPACE_ON_FILESYSTEM: ++ errno = ENOSPC; ++ break; ++ case SSH_FX_QUOTA_EXCEEDED: ++ errno = EDQUOT; ++ break: ++#endif ++ case SSH_FX_OK: ++ status_msg_free(status); ++ return err; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); + status_msg_free(status); +- return err; ++ return -1; + default: + ssh_set_error(sftp->session,SSH_FATAL,"Received message %d during sftp_handle_close!",msg->packet_type); + sftp_message_free(msg); +@@ -868,6 +907,23 @@ SFTP_FILE *sftp_open(SFTP_SESSION *sftp, + sftp_message_free(msg); + if(!status) + return NULL; ++ switch (status->status) { ++ case SSH_FX_FILE_ALREADY_EXISTS: ++ errno = EEXIST; ++ break; ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_PERMISSION_DENIED: ++ errno = EACCES; ++ break; ++ case SSH_FX_OP_UNSUPPORTED: ++ errno = EINVAL; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; ++ } + ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); + status_msg_free(status); + return NULL; +@@ -925,14 +981,21 @@ int sftp_read(SFTP_FILE *handle, void *d + sftp_message_free(msg); + if(!status) + return -1; +- if(status->status != SSH_FX_EOF){ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); +- err=-1; +- } +- else ++ switch (status->status) { ++ case SSH_FX_INVALID_HANDLE: ++ errno = EBADF; ++ break; ++ case SSH_FX_EOF: + handle->eof=1; ++ status_msg_free(status); ++ return err ? err : 0; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; ++ } ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); + status_msg_free(status); +- return err?err:0; ++ return -1; + case SSH_FXP_DATA: + datastring=buffer_get_ssh_string(msg->payload); + sftp_message_free(msg); +@@ -992,13 +1055,22 @@ int sftp_write(SFTP_FILE *file, void *da + sftp_message_free(msg); + if(!status) + return -1; +- if(status->status != SSH_FX_OK){ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); +- err=-1; ++ switch (status->status) { ++ case SSH_FX_INVALID_HANDLE: ++ errno = EBADF; ++ break; ++ case SSH_FX_OK: ++ file->offset+=len; ++ status_msg_free(status); ++ return err ? err : len; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server : %s",status->errormsg); + file->offset+=len; + status_msg_free(status); +- return (err?err:len); ++ return -1; + default: + ssh_set_error(sftp->session,SSH_FATAL,"Received message %d during write!",msg->packet_type); + sftp_message_free(msg); +@@ -1044,14 +1116,27 @@ int sftp_rm(SFTP_SESSION *sftp, char *fi + sftp_message_free(msg); + if (!status) + return -1; +- if (status->status != SSH_FX_OK) { +- /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); +- status_msg_free(status); +- return -1; ++ switch (status->status) { ++ case SSH_FX_FILE_ALREADY_EXISTS: ++ errno = EEXIST; ++ break; ++ case SSH_FX_OP_UNSUPPORTED: ++ errno = EINVAL; ++ break; ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_OK: ++ status_msg_free(status); ++ return 0; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); + status_msg_free(status); +- return 0; /* at this point, everything turned out OK */ ++ return -1; + } else { + ssh_set_error(sftp->session,SSH_FATAL, "Received message %d when attempting to remove file", msg->packet_type); + sftp_message_free(msg); +@@ -1083,18 +1168,21 @@ int sftp_rmdir(SFTP_SESSION *sftp, char + { + status = parse_status_msg(msg); + sftp_message_free(msg); +- if (!status) +- { ++ if (!status) { + return -1; + } +- else if (status->status != SSH_FX_OK) /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ +- { +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); ++ switch (status->status) { ++ case SSH_FX_OK: + status_msg_free(status); +- return -1; ++ return 0; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); + status_msg_free(status); +- return 0; /* at this point, everything turned out OK */ ++ return -1; + } + else + { +@@ -1111,6 +1199,7 @@ int sftp_mkdir(SFTP_SESSION *sftp, char + STRING *path = string_from_char(directory); + SFTP_MESSAGE *msg = NULL; + STATUS_MESSAGE *status = NULL; ++ SFTP_ATTRIBUTES *errno_attr = NULL; + + buffer_add_u32(buffer, id); + buffer_add_ssh_string(buffer, path); +@@ -1127,17 +1216,30 @@ int sftp_mkdir(SFTP_SESSION *sftp, char + /* by specification, this command's only supposed to return SSH_FXP_STATUS */ + status = parse_status_msg(msg); + sftp_message_free(msg); +- if (!status) +- return -1; +- else +- if (status->status != SSH_FX_OK) { +- /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); ++ switch (status->status) { ++ case SSH_FX_FAILURE: ++ /* ++ * mkdir always returns a failure, even if the path already exists. ++ * To be POSIX conform and to be able to map it to EEXIST a stat ++ * call should be issued here ++ */ ++ errno_attr = sftp_lstat(sftp, directory); ++ if (errno_attr != NULL) { ++ errno = EEXIST; ++ } ++ break; ++ case SSH_FX_OK: + status_msg_free(status); +- return -1; ++ return 0; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); + status_msg_free(status); +- return 0; /* at this point, everything turned out OK */ ++ return -1; + } else { + ssh_set_error(sftp->session,SSH_FATAL, "Received message %d when attempting to make directory", msg->packet_type); + sftp_message_free(msg); +@@ -1172,14 +1274,24 @@ int sftp_rename(SFTP_SESSION *sftp, char + sftp_message_free(msg); + if (!status) + return -1; +- else if (status->status != SSH_FX_OK) { +- /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); ++ switch (status->status) { ++ case SSH_FX_FILE_ALREADY_EXISTS: ++ errno = EEXIST; ++ break; ++ case SSH_FX_OP_UNSUPPORTED: ++ errno = EINVAL; ++ break; ++ case SSH_FX_OK: + status_msg_free(status); +- return -1; ++ return 0; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); + status_msg_free(status); +- return 0; /* at this point, everything turned out OK */ ++ return -1; + } else { + ssh_set_error(sftp->session,SSH_FATAL, "Received message %d when attempting to rename", msg->packet_type); + sftp_message_free(msg); +@@ -1212,14 +1324,27 @@ int sftp_setstat(SFTP_SESSION *sftp, cha + sftp_message_free(msg); + if (!status) + return -1; +- else if (status->status != SSH_FX_OK) { +- /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ +- ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); ++ switch (status->status) { ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_PERMISSION_DENIED: ++ errno = EACCES; ++ break; ++ case SSH_FX_INVALID_HANDLE: ++ errno = EBADF; ++ break; ++ case SSH_FX_OK: + status_msg_free(status); +- return -1; ++ return 0; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; + } ++ /* status should be SSH_FX_OK if the command was successful, if it didn't, then there was an error */ ++ ssh_set_error(sftp->session,SSH_REQUEST_DENIED, "sftp server: %s", status->errormsg); + status_msg_free(status); +- return 0; /* at this point, everything turned out OK */ ++ return -1; + } else { + ssh_set_error(sftp->session,SSH_FATAL, "Received message %d when attempting to set stats", msg->packet_type); + sftp_message_free(msg); +@@ -1302,6 +1427,17 @@ SFTP_ATTRIBUTES *sftp_xstat(SFTP_SESSION + sftp_message_free(msg); + if(!status) + return NULL; ++ switch (status->status) { ++ case SSH_FX_NO_SUCH_FILE: ++ errno = ENOENT; ++ break; ++ case SSH_FX_PERMISSION_DENIED: ++ errno = EACCES; ++ break; ++ default: ++ ssh_say(1, "%s:%d - handle status: %d\n", __FILE__, __LINE__, status->status); ++ break; ++ } + ssh_set_error(sftp->session,SSH_REQUEST_DENIED,"sftp server: %s",status->errormsg); + status_msg_free(status); + return NULL; diff --git a/libssh-0.2.tar.bz2 b/libssh-0.2.tar.bz2 new file mode 100644 index 0000000..edbb79e --- /dev/null +++ b/libssh-0.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9818572980459427e3b5bfdf3ad5e94a43e086e9989f126ec1a250d454094136 +size 235758 diff --git a/libssh-paths.patch b/libssh-paths.patch new file mode 100644 index 0000000..82775db --- /dev/null +++ b/libssh-paths.patch @@ -0,0 +1,53 @@ +Index: Makefile.in +=================================================================== +--- Makefile.in (revisiĆ³n: 119) ++++ Makefile.in (copia de trabajo) +@@ -7,12 +7,12 @@ + srcdir = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-bindir = $(exec_prefix)/bin +-incldir= $(prefix)/include +-infodir = $(prefix)/info +-libdir = $(prefix)/lib +-mandir = $(prefix)/share/man +-docdir = $(prefix)/share/doc ++bindir = @bindir@ ++incldir= @includedir@ ++infodir = @infodir@ ++libdir = @libdir@ ++mandir = @mandir@ ++docdir = @docdir@ + + CC = @CC@ + CFLAGS = @CFLAGS@ -Iinclude -Wall +Index: libssh/Makefile.in +=================================================================== +--- libssh/Makefile.in (revisiĆ³n: 119) ++++ libssh/Makefile.in (copia de trabajo) +@@ -12,11 +12,11 @@ + srcdir = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-bindir = $(exec_prefix)/bin +-incldir= $(prefix)/include +-infodir = $(prefix)/info +-libdir = $(prefix)/lib/ +-mandir = $(prefix)/man/man1 ++bindir = @bindir@ ++incldir= @includedir@ ++infodir = @infodir@ ++libdir = @libdir@ ++mandir = @mandir@/man1 + + CC = @CC@ + CFLAGS = @CFLAGS@ -Wall -g -I../include/ +@@ -36,7 +36,7 @@ + all: libssh.so + + libssh.la: $(OBJECTS) libssh.vers +- $(LIBTOOL) --mode=link $(CC) -o libssh.la -export-dynamic -version-info $(LIBSSH_CURRENT):$(LIBSSH_REVISION):$(LIBSSH_AGE) -rpath $(libdir) $(OBJECTS:.o=.lo) $(LIBS) $(LIBSSH_LDFLAGS) $(LIBSSH_VERS) $(LDFLAGS) ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libssh.la -export-dynamic -version-info $(LIBSSH_CURRENT):$(LIBSSH_REVISION):$(LIBSSH_AGE) -rpath $(libdir) $(OBJECTS:.o=.lo) $(LIBS) $(LIBSSH_LDFLAGS) $(LIBSSH_VERS) + + libssh.so: libssh.la + libssh.a: libssh.la diff --git a/libssh-rpmlintrc b/libssh-rpmlintrc new file mode 100644 index 0000000..eef92b5 --- /dev/null +++ b/libssh-rpmlintrc @@ -0,0 +1 @@ +addFilter("libssh-2.* shlib-policy-name-error") diff --git a/libssh.changes b/libssh.changes new file mode 100644 index 0000000..0292227 --- /dev/null +++ b/libssh.changes @@ -0,0 +1,32 @@ +------------------------------------------------------------------- +Tue Oct 7 21:19:07 CEST 2008 - aj@suse.de + +- Disable parallel build since it breaks the build. + +------------------------------------------------------------------- +Tue Sep 30 14:02:58 CEST 2008 - ro@suse.de + +- add rpmlintrc (desired package name is already taken by another + package) + +------------------------------------------------------------------- +Tue Sep 30 13:49:00 CEST 2008 - ro@suse.de + +- fix debug package requires + +------------------------------------------------------------------- +Tue Sep 30 12:41:19 CEST 2008 - ro@suse.de + +- fixed filelist + +------------------------------------------------------------------- +Thu Aug 21 11:26:29 CEST 2008 - anschneider@suse.de + +- Map the permissions field to the type field for sftp v3. +- Add errno mapping for sftp functions + +------------------------------------------------------------------- +Wed Aug 20 16:08:57 CEST 2008 - anschneider@suse.de + +- initial libssh2 package + diff --git a/libssh.spec b/libssh.spec new file mode 100644 index 0000000..0341401 --- /dev/null +++ b/libssh.spec @@ -0,0 +1,179 @@ +# +# spec file for package libssh (Version 0.2) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Url: http://0xbadc0de.be/wiki/libssh:libssh + +Name: libssh +BuildRequires: doxygen openssl-devel +License: LGPL v2.1 or later +Group: System/Libraries +Version: 0.2 +Release: 3 +Summary: SSH library +Source0: %{name}-%{version}.tar.bz2 +Source1: libssh-rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch00: libssh-paths.patch +Patch01: 0001-Map-permission-field-to-type-field.patch +Patch02: 0002-Add-errno-mapping.patch +%define debug_package_requires libssh-2 = %{version}-%{release} + +%description +The ssh library was designed to be used by programmers needing a +working SSH implementation by the mean of a library. The complete +control of the client is made by the programmer. With libssh, you can +remotely execute programs, transfer files, use a secure and transparent +tunnel for your remote programs. With its Secure FTP implementation, +you can play with remote files easily, without third-party programs +others than libcrypto (from openssl). + +This package provides libssh from http://0xbadc0de.be/ that should not +be confused with libssh2 available from http://www.libssh2.org (libssh2 +package) + + + +Authors: +-------- + Aris Adamantiadis + Nick Zitzmann + +%package -n libssh-2 +License: LGPL v2.1 or later +Group: System/Libraries +Summary: SSH library + +%description -n libssh-2 +The ssh library was designed to be used by programmers needing a +working SSH implementation by the mean of a library. The complete +control of the client is made by the programmer. With libssh, you can +remotely execute programs, transfer files, use a secure and transparent +tunnel for your remote programs. With its Secure FTP implementation, +you can play with remote files easily, without third-party programs +others than libcrypto (from openssl). + +This package provides libssh from http://0xbadc0de.be/ that should not +be confused with libssh2 available from http://www.libssh2.org (libssh2 +package) + + + +Authors: +-------- + Aris Adamantiadis + Nick Zitzmann + +%package devel +License: LGPL v2.1 or later +Group: Development/Libraries/C and C++ +Summary: SSH library development headers +Requires: libssh-2 = %{version} + +%description devel +Development headers for the SSH library. + + + +Authors: +-------- + Aris Adamantiadis + Nick Zitzmann + +%package devel-doc +License: LGPL v2.1 or later +Group: Development/Languages/C and C++ +Summary: SSH library api documentation + +%description devel-doc +Documentation for libssh development. + + + +Authors: +-------- + Aris Adamantiadis + Nick Zitzmann + +%prep +%setup -q +%patch00 +%patch01 -p1 +%patch02 -p1 + +%build +autoreconf -fi +%configure \ + --docdir=%{_docdir} \ + --disable-static \ + --with-pic +%{__make} +%{__make} doc + +%install +%{__make} DESTDIR=%{buildroot} install +%{__make} DESTDIR=%{buildroot} install-doc + +%post -n libssh-2 +/sbin/ldconfig + +%postun -n libssh-2 +/sbin/ldconfig + +%clean +%{__rm} -rf %{buildroot} + +%files -n libssh-2 +%defattr(-,root,root) +%{_libdir}/libssh.so.* + +%files devel +%defattr(-,root,root) +%doc AUTHORS README CHANGELOG +%dir %{_includedir}/libssh/ +%attr(0644,root,root) %{_includedir}/libssh/* +%{_libdir}/libssh.so +%exclude %{_libdir}/libssh.la + +%files devel-doc +%defattr(-,root,root) +%dir %{_docdir}/libssh +%dir %{_docdir}/libssh/html +%attr(0644,root,root) %{_docdir}/libssh/html/* +%dir %{_docdir}/libssh/examples +%attr(0644,root,root) %{_docdir}/libssh/examples/* +%attr(0644,root,root) %{_mandir}/man?/ssh_* +%exclude %{_mandir}/man?/buffer_struct.3* +%exclude %{_mandir}/man?/bug.3* +%exclude %{_mandir}/man?/deprecated.3* + +%changelog +* Tue Oct 07 2008 aj@suse.de +- Disable parallel build since it breaks the build. +* Tue Sep 30 2008 ro@suse.de +- add rpmlintrc (desired package name is already taken by another + package) +* Tue Sep 30 2008 ro@suse.de +- fix debug package requires +* Tue Sep 30 2008 ro@suse.de +- fixed filelist +* Thu Aug 21 2008 anschneider@suse.de +- Map the permissions field to the type field for sftp v3. +- Add errno mapping for sftp functions +* Wed Aug 20 2008 anschneider@suse.de +- initial libssh2 package diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4