This commit is contained in:
Igor Pashev 2013-09-26 20:01:17 +04:00
parent e838149bc0
commit ca5746a89a
16 changed files with 391 additions and 0 deletions

View File

@ -0,0 +1,10 @@
Real sources are in the package illumos-source-X.Y,
where X and Y are numbers. Exact values of X and Y
are set in Build-Depends field of debian/control as
well as in the version string in debian/changelog,
in a form of X.Y-1.
To add a patch you need first to unpack files from
illumos-source-X.Y using ./debian/rules unpack
and, desirably, ./debian/rules patch

View File

@ -0,0 +1,5 @@
libsmbfs (2.10+1) unstable; urgency=low
* Initial release.
-- Igor Pashev <pashev.igor@gmail.com> Thu, 26 Sep 2013 20:01:04 +0400

1
libsmbfs/debian/compat Normal file
View File

@ -0,0 +1 @@
9

34
libsmbfs/debian/control Normal file
View File

@ -0,0 +1,34 @@
Source: libsmbfs
Section: libs
Priority: optional
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
dh-illumos,
illumos-source-2.10,
quilt,
libidmap-dev,
libkrb5-dev,
libpkcs11-dev,
libsec-dev,
symlinks,
Standards-Version: 3.9.3
Homepage: https://www.illumos.org
Package: libsmbfs1
Section: libs
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Architecture: illumos-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: SMB/CIFS File System client library
Package: libsmbfs1-dev
Section: libdevel
Architecture: illumos-any
Provides: libsmbfs-dev
Depends: libsmbfs1 (= ${binary:Version}), ${misc:Depends}
Description: SMB/CIFS File System client library (development files)
This package contains the header files and symlinks needed
to compile applications that use libsmbfs.

27
libsmbfs/debian/copyright Normal file
View File

@ -0,0 +1,27 @@
Files: debian/*
Copyright: 2013, Igor Pashev <pashev.igor@gmail.com>
License: WTFPL-2
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
.
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
.
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
.
0. You just DO WHAT THE FUCK YOU WANT TO.
Files: *
License: CDDL
Note that sources are not in this package but in the package
illumos-source-X.Y. Those sources are covered by Common Development
and Distribution License (CDDL).
.
On Dyson system, the full text of the CDDL license
can be found in the file `/usr/share/common-licenses/CDDL-1.0'.

View File

@ -0,0 +1,4 @@
/usr/lib/*/libsmbfs.so
/usr/include/netsmb/*.h
usr/src/lib/libsmbfs/netsmb/smb_lib.h usr/include/netsmb/
usr/src/lib/libsmbfs/netsmb/smbfs_api.h usr/include/netsmb/

View File

@ -0,0 +1 @@
/usr/lib/*/libsmbfs.so.1

View File

@ -0,0 +1,96 @@
libsmbfs.so.1 libsmbfs1 #MINVER#
SUNWprivate@SUNWprivate 2.10
convert_leunicode_to_utf8@SUNWprivate 2.10
convert_unicode_to_utf8@SUNWprivate 2.10
convert_utf8_to_leunicode@SUNWprivate 2.10
convert_utf8_to_unicode@SUNWprivate 2.10
convert_utf8_to_wincs@SUNWprivate 2.10
convert_wincs_to_utf8@SUNWprivate 2.10
nb_ctx_create@SUNWprivate 2.10
nb_ctx_done@SUNWprivate 2.10
nb_ctx_readrcsection@SUNWprivate 2.10
nb_ctx_resolve@SUNWprivate 2.10
nb_ctx_setns@SUNWprivate 2.10
nb_resolvehost_in@SUNWprivate 2.10
nb_strerror@SUNWprivate 2.10
nbns_getnodestatus@SUNWprivate 2.10
nbns_resolvename@SUNWprivate 2.10
nls_str_toloc@SUNWprivate 2.10
nls_str_upper@SUNWprivate 2.10
smb_close_rcfile@SUNWprivate 2.10
smb_ctx_alloc@SUNWprivate 2.10
smb_ctx_done@SUNWprivate 2.10
smb_ctx_flags2@SUNWprivate 2.10
smb_ctx_free@SUNWprivate 2.10
smb_ctx_get_ssn@SUNWprivate 2.10
smb_ctx_get_tree@SUNWprivate 2.10
smb_ctx_gethandle@SUNWprivate 2.10
smb_ctx_init@SUNWprivate 2.10
smb_ctx_kill@SUNWprivate 2.10
smb_ctx_opt@SUNWprivate 2.10
smb_ctx_parseunc@SUNWprivate 2.10
smb_ctx_readrc@SUNWprivate 2.10
smb_ctx_resolve@SUNWprivate 2.10
smb_ctx_scan_argv@SUNWprivate 2.10
smb_ctx_set_close_hook@SUNWprivate 2.10
smb_ctx_setauthflags@SUNWprivate 2.10
smb_ctx_setdomain@SUNWprivate 2.10
smb_ctx_setfullserver@SUNWprivate 2.10
smb_ctx_setnbflags@SUNWprivate 2.10
smb_ctx_setpassword@SUNWprivate 2.10
smb_ctx_setpwhash@SUNWprivate 2.10
smb_ctx_setscope@SUNWprivate 2.10
smb_ctx_setserver@SUNWprivate 2.10
smb_ctx_setshare@SUNWprivate 2.10
smb_ctx_setsigning@SUNWprivate 2.10
smb_ctx_setsrvaddr@SUNWprivate 2.10
smb_ctx_setuser@SUNWprivate 2.10
smb_ctx_setwins@SUNWprivate 2.10
smb_debug@SUNWprivate 2.10
smb_error@SUNWprivate 2.10
smb_fh_close@SUNWprivate 2.10
smb_fh_getssnkey@SUNWprivate 2.10
smb_fh_open@SUNWprivate 2.10
smb_fh_read@SUNWprivate 2.10
smb_fh_write@SUNWprivate 2.10
smb_fh_xactnp@SUNWprivate 2.10
smb_get_authentication@SUNWprivate 2.10
smb_getprogname@SUNWprivate 2.10
smb_iod_connect@SUNWprivate 2.10
smb_iod_door_path@SUNWprivate 2.10
smb_iod_open_door@SUNWprivate 2.10
smb_iod_start@SUNWprivate 2.10
smb_iod_work@SUNWprivate 2.10
smb_lib_init@SUNWprivate 2.10
smb_netshareenum@SUNWprivate 2.10
smb_open_printer@SUNWprivate 2.10
smb_open_rcfile@SUNWprivate 2.10
smb_rap_create@SUNWprivate 2.10
smb_rap_done@SUNWprivate 2.10
smb_rap_error@SUNWprivate 2.10
smb_rap_getNparam@SUNWprivate 2.10
smb_rap_request@SUNWprivate 2.10
smb_rap_setNparam@SUNWprivate 2.10
smb_rap_setPparam@SUNWprivate 2.10
smb_simplecrypt@SUNWprivate 2.10
smb_simpledecrypt@SUNWprivate 2.10
smb_strerror@SUNWprivate 2.10
smb_verbose@SUNWprivate 2.10
smbfs_acl_free_sd@SUNWprivate 2.10
smbfs_acl_get@SUNWprivate 2.10
smbfs_acl_getsd@SUNWprivate 2.10
smbfs_acl_print_sd@SUNWprivate 2.10
smbfs_acl_sd2zfs@SUNWprivate 2.10
smbfs_acl_set@SUNWprivate 2.10
smbfs_acl_setsd@SUNWprivate 2.10
smbfs_acl_zfs2sd@SUNWprivate 2.10
smbfs_default_dom_usr@SUNWprivate 2.10
smbfs_keychain_add@SUNWprivate 2.10
smbfs_keychain_addhash@SUNWprivate 2.10
smbfs_keychain_chk@SUNWprivate 2.10
smbfs_keychain_del@SUNWprivate 2.10
smbfs_keychain_del_everyone@SUNWprivate 2.10
smbfs_keychain_del_owner@SUNWprivate 2.10
smbfs_set_default_domain@SUNWprivate 2.10
smbfs_set_default_user@SUNWprivate 2.10
smbutil_std_opts@SUNWprivate 2.10

View File

@ -0,0 +1,44 @@
Index: libsmbfs/usr/src/lib/libsmbfs/smb/krb5ssp.c
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/smb/krb5ssp.c 2012-10-08 04:25:42.000000000 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/smb/krb5ssp.c 2013-09-26 19:26:03.920193354 +0400
@@ -72,10 +72,13 @@
#include "derparse.h"
#include "ssp.h"
-#include <kerberosv5/krb5.h>
-#include <kerberosv5/com_err.h>
+#ifdef KRB5_DEPRECATED
+# undef KRB5_DEPRECATED
+#endif
+#define KRB5_DEPRECATED 1
+
+#include <krb5/krb5.h>
#include <gssapi/gssapi.h>
-#include <gssapi/mechs/krb5/include/auth_con.h>
/* RFC 4121 checksum type ID. */
#define CKSUM_TYPE_RFC4121 0x8003
@@ -189,8 +192,8 @@
fn = "krb5_auth_con_init";
goto out;
}
- /* Missing krb5_auth_con_set_req_cksumtype(), so inline. */
- ss->ss_auth->req_cksumtype = CKSUM_TYPE_RFC4121;
+
+ kerr = krb5_auth_con_set_req_cksumtype(ss->ss_krb5ctx, ss->ss_auth, CKSUM_TYPE_RFC4121);
/*
* Build an RFC 4121 "checksum" with NULL channel bindings,
Index: libsmbfs/usr/src/lib/libsmbfs/Makefile.com
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/Makefile.com 2013-09-26 18:55:20.043441313 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/Makefile.com 2013-09-26 19:10:13.459065397 +0400
@@ -99,6 +99,7 @@
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-deprecated-declarations
CPPFLAGS += -D__EXTENSIONS__ -D_REENTRANT -DMIA \
-I$(SRCDIR) -I.. \

View File

@ -0,0 +1,12 @@
Index: libsmbfs/usr/src/lib/libsmbfs/Makefile.com
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/Makefile.com 2013-09-26 19:10:13.459065397 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/Makefile.com 2013-09-26 19:29:41.975481370 +0400
@@ -93,6 +93,7 @@
C99MODE= $(C99_ENABLE)
LDLIBS += -lsocket -lnsl -lc -lmd -lpkcs11 -lkrb5 -lsec -lidmap
+LDLIBS += -liconv
# normal warnings...
CFLAGS += $(CCVERBOSE)

View File

@ -0,0 +1,14 @@
Description: ../Makefile.com:109: *** missing separator
Index: libsmbfs/usr/src/lib/libsmbfs/Makefile.com
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/Makefile.com 2012-10-08 04:25:42.000000000 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/Makefile.com 2013-09-26 18:55:20.043441313 +0400
@@ -106,7 +106,7 @@
-I$(SRC)/common/smbclnt
# Debugging
-${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG
+${NOT_RELEASE_BUILD}CPPFLAGS += -DDEBUG
# uncomment these for dbx debugging
#COPTFLAG = -g

View File

@ -0,0 +1,25 @@
Description: x86_64-illumos/libsmbfs.so: section [4212644412](null): has invalid sh_info: 137438953472
1. GNU strip breaks such libraries
2. We don't use -Bdirect
Index: libsmbfs/usr/src/lib/libsmbfs/smb/mapfile-vers
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/smb/mapfile-vers 2012-10-08 04:25:42.000000000 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/smb/mapfile-vers 2013-09-26 19:48:38.542939883 +0400
@@ -92,7 +92,7 @@
smb_ctx_setuser;
smb_ctx_setwins;
- smb_debug { FLAGS = NODIRECT }; # data
+ smb_debug; # data
smb_error;
#
# Functions to support named pipes
@@ -127,7 +127,7 @@
smb_rap_setNparam;
smb_rap_setPparam;
#
- smb_verbose { FLAGS = NODIRECT }; # data
+ smb_verbose; # data
#
# Functions to support Access Control Lists (ACLs)
smbfs_acl_free_sd;

View File

@ -0,0 +1,18 @@
Index: libsmbfs/usr/src/lib/libsmbfs/Makefile
===================================================================
--- libsmbfs.orig/usr/src/lib/libsmbfs/Makefile 2012-10-08 04:25:42.000000000 +0400
+++ libsmbfs/usr/src/lib/libsmbfs/Makefile 2013-09-26 19:28:35.028254131 +0400
@@ -36,9 +36,11 @@
ROOTHDRDIR= $(ROOT)/usr/include/netsmb
ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%)
-# ISA targets
+ifeq ($(DEB_BUILD_ARCH_BITS),32)
SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+else
+SUBDIRS = $(MACH64)
+endif
# conditional assignments
all := TARGET= all

View File

@ -0,0 +1,5 @@
libsmbfs-makefile.patch
libsmbfs-kerberos.patch
libsmbfs-no-multilib.patch
libsmbfs-libiconv.patch
libsmbfs-mapfile-vers.patch

94
libsmbfs/debian/rules Executable file
View File

@ -0,0 +1,94 @@
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
export DH_VERBOSE = 1
# libs having "install_h" target to install headers:
libs_headers := \
libsmbfs \
# All libraries to build and to package.
# Order is important:
libs := $(libs_headers) \
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate --build \
$(libs:%=usr/src/lib/%) \
usr/src/common/smbclnt
# Not used and buggy:
echo > usr/src/Makefile.msg.targ
touch $@
patch: patch-stamp
patch-stamp: unpack-stamp
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
touch $@
unpatch:
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
rm -f patch-stamp
dirs-stamp:
. usr/env.sh; mkdir -p \
debian/tmp/usr/include \
debian/tmp$$DEB_LIBDIR_32 \
debian/tmp$$DEB_LIBDIR_64 \
debian/tmp$$DEB_USRLIBDIR_32 \
debian/tmp$$DEB_USRLIBDIR_64
touch $@
headers-stamp: patch-stamp dirs-stamp
dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h
touch $@
install build build-arch build-indep: build-stamp
build-stamp: patch-stamp dirs-stamp headers-stamp
dh_illumos_make $(libs:%=usr/src/lib/%)
# Move dev symlink from /lib into /usr/lib:
for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \
ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \
rm $$l; \
done
for l in `find debian/tmp/lib/$(DEB_HOST_MULTIARCH) -maxdepth 1 -type l -name \*.so`; do \
ln -sf `readlink -f $$l` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $$l`; \
rm $$l; \
done
# Make symlinks relative:
symlinks -c debian/tmp/usr/lib32
symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
touch $@
binary binary-arch binary-indep: binary-stamp
binary-stamp: build-stamp
dh_testdir
dh_testroot
dh_installdirs
dh_install
dh_installman
dh_installdocs
dh_installexamples
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
dh_makeshlibs -- -c4
dh_installdeb
dh_shlibdeps
dh_strip
dh_gencontrol
dh_md5sums
dh_builddeb
touch $@
clean: unpatch
dh_testdir
dh_testroot
dh_clean
rm -rf usr .pc

View File

@ -0,0 +1 @@
3.0 (native)