diff options
author | barner <barner@FreeBSD.org> | 2005-11-17 20:14:31 +0800 |
---|---|---|
committer | barner <barner@FreeBSD.org> | 2005-11-17 20:14:31 +0800 |
commit | 53d598707b74a6edcd83226519900987918dee28 (patch) | |
tree | ea1290d1852583c5b257c611b66edf2df12c8d24 /net/smb4k | |
parent | 33018d7d22c269a983a89eed12d0214e5abb56ea (diff) | |
download | freebsd-ports-gnome-53d598707b74a6edcd83226519900987918dee28.tar.gz freebsd-ports-gnome-53d598707b74a6edcd83226519900987918dee28.tar.zst freebsd-ports-gnome-53d598707b74a6edcd83226519900987918dee28.zip |
Add smb4k 0.6.3,
kDE 3.x SMB Network browser and SMB shares
mounting center.
PR: 88269
Submitted by: Rashid N. Achilov <shelton@granch.ru>
Diffstat (limited to 'net/smb4k')
-rw-r--r-- | net/smb4k/Makefile | 39 | ||||
-rw-r--r-- | net/smb4k/distinfo | 3 | ||||
-rw-r--r-- | net/smb4k/files/README.FreeBSD | 98 | ||||
-rw-r--r-- | net/smb4k/files/patch-smb4kfileio | 11 | ||||
-rw-r--r-- | net/smb4k/files/smb2awk | 30 | ||||
-rw-r--r-- | net/smb4k/files/smb2nsmbrc | 43 | ||||
-rw-r--r-- | net/smb4k/pkg-descr | 18 | ||||
-rw-r--r-- | net/smb4k/pkg-message | 22 | ||||
-rw-r--r-- | net/smb4k/pkg-plist | 84 |
9 files changed, 348 insertions, 0 deletions
diff --git a/net/smb4k/Makefile b/net/smb4k/Makefile new file mode 100644 index 000000000000..1277e4e3ccc2 --- /dev/null +++ b/net/smb4k/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: smb4k +# Date created: 28 Oct 2005 +# Whom: Rashid N. Achilov <shelton@granch.ru> +# +# $FreeBSD$ +# + +PORTNAME= smb4k +PORTVERSION= 0.6.3 +CATEGORIES= net kde +MASTER_SITES= http://download.berlios.de/smb4k/ + +MAINTAINER= shelton@granch.ru +COMMENT= KDE 3.x SMB Network browser and SMB shares mounting center + +RUN_DEPENDS= sudo:${PORTSDIR}/security/sudo \ + smbstatus:/${PORTSDIR}/net/samba3 + +USE_KDELIBS_VER= 3 +USE_GMAKE= yes +USE_REINPLACE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS += --with-qt-dir=${QT_PREFIX} \ + --with-extra-includes=${LOCALBASE}/include \ + --with-extra-libs=${LOCALBASE}/lib +DOCSDIR= share/doc/HTML/en/${PORTNAME} +PLIST_SUB= DOCSDIR=${DOCSDIR} + +USE_AUTOTOOLS= libtool:15 +INSTALLS_SHLIB= yes + +post-install: +.for i in smb2awk smb2nsmbrc + ${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin +.endfor + ${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${PREFIX}/${DOCSDIR} + @${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net/smb4k/distinfo b/net/smb4k/distinfo new file mode 100644 index 000000000000..f05c107d4612 --- /dev/null +++ b/net/smb4k/distinfo @@ -0,0 +1,3 @@ +MD5 (smb4k-0.6.3.tar.gz) = 8cac939f2efc50e9b128633db4d69847 +SHA256 (smb4k-0.6.3.tar.gz) = a035eb18b20d5be29a3f58615b243a3ebc8e819d77c8bc138b1f4b70521973eb +SIZE (smb4k-0.6.3.tar.gz) = 1081614 diff --git a/net/smb4k/files/README.FreeBSD b/net/smb4k/files/README.FreeBSD new file mode 100644 index 000000000000..e5c19358022a --- /dev/null +++ b/net/smb4k/files/README.FreeBSD @@ -0,0 +1,98 @@ + SMB mounting in FreeBSD with SMB4K + ---------------------------------- + $Id: README.FreeBSD,v 1.3 2004/05/21 12:32:47 shelton Exp $ + +1. Preface +---------- + +This document describes, how to coordinate SNB4K (initially Linux-only program) +and FreeBSD implementation of SMBFS. This document assumed, that you already +have working SMBFS in your kernel (see man mount_smbfs(8), FreeBSD Handbook +chapter 9 and an sample kernel config file part below: + +# +# SMB/CIFS requester +# NETSMB enables support for SMB protocol, it requires LIBMCHAIN and LIBICONV +# options. +# NETSMBCRYPTO enables support for encrypted passwords. +options NETSMB #SMB/CIFS requester +options NETSMBCRYPTO #encrypted password support for SMB + +# mchain library. It can be either loaded as KLD or compiled into kernel +options LIBMCHAIN #mbuf management library +options SMBFS #SMB/CIFS filesystem +# Kernel side iconv library +options LIBICONV + +You need all these for working SMBFS) and /etc/nsmb.conf configured properly +(in spite of that nsmb.conf has all variables 'transparent', documentation +about SMBFS tuning in FreeBSD are very, very shy :-( You should setup at least +paremeters "workgroup" and "nbns". As nbns you should set your WINS server +(as called it in Microsoft world). + +2. After setup, but before first run +------------------------------------ + +So, you has just setup SMB4K. What should you do to properly mounting SMB +shares? You should do some things. + +a. Remember, that SMB4K didn't mount shares itself. Instead of that, it +called 'smb4k_mount' with some set of parameters: server and share path in +//server/share format, mount point in /home/dir/dir2 format and parameters string, +as expected mount_smbfs. Also, SMB4K didn't umount shares itself. Instead of +this it called 'smb4k_umount' with single parameter - mount point. + +b. Before start SMB4K first time, you should setup your .nsmbrc file +properly. For my pity, you must setup each Windows/Samba box in your network +SEPARATELY. No default usernames, no domain logons. Looks sadly, aren't you? +smb2nsmbrc script sligtly takes this job from you. You start smb2nsmbrc, it +called findsmb (of course, you should have findsmb and smbutil in your path), +parsing their output, asks you about username, password and stored file +.nsmbrctmp in current directory with pairs + +[SERVERNAME:USERNAME] +password=<encrypted password> + +Encryption done with smbutil and ready for use with mount_smbfs. Findsmb takes +your first network interface, so, when you have a box with some network cards, +start smb2nsmbrc with two parameters - network address and broadcast address. +These parameters will passed directly to findsmb. When .nsmbrctmp file already +exist it will added, not replaced! Simply add .nsmbrctmp content to your .nsmbrc +file in your home directory + +c. You should have a 'sudo' package. SMB4K detect it and modify sudoers file + +3. Inside running SMB4K +----------------------- + +When you have done all previous steps properly (it looks quite difficult, but +PLEASE, do not ask me, ask SMBFS developers, why kernel-side support of SMBFS +in FreeBSD is extremely shy, undocumented and forgotten), you should see files in +mounted share, when you click on it in SMB4K window. When you see empty +directory (and really this directory keeps files), check these: + +- You should have SMBFS in your kernel +- You should have propelry nsmb.conf +- You should have properly .nsmbrc (keep in mind - all server and user names + in UPPER case!) with presented pairs [server:user] about EACH server and + EACH user (so, when you have two logins alice and bob and two server alpha + and beta, you should have 4 entries in .nsmbrc - [ALICE:ALPHA], [ALICE:BETA], + [BOB:ALPHA] and [BOB:BETA]). + +When all these has been done, but mount unsuccesful, try to mount this share +manually. Also you can uncomment string + +echo $@ > /tmp/somefile + +at start of smbmount script and looks, how passed a mount arguments in file +/tmp/somefile. + +4. Feedback +----------- + +All these scripts and this readme file were written by Rashid N. Achilov +(shelton@granch.ru). So, you can ask me about their working and also about +any other SMB shares mounting errors, but keep in mind - I'm NOT A SMBFS +DEVELOPER, I know nothing about internal technic of kernel-side support +of SMBFS under FreeBSD. To ask with serious problems, please mail to SMB developer: +Boris Popov <bp@freebsd.org>. diff --git a/net/smb4k/files/patch-smb4kfileio b/net/smb4k/files/patch-smb4kfileio new file mode 100644 index 000000000000..7d4725c5b286 --- /dev/null +++ b/net/smb4k/files/patch-smb4kfileio @@ -0,0 +1,11 @@ +--- smb4k/core/smb4kfileio.cpp.bak Mon Oct 31 17:09:18 2005 ++++ smb4k/core/smb4kfileio.cpp Mon Oct 31 17:09:18 2005 +@@ -221,7 +221,7 @@ + contents.append( "smb4k_mount\t"+m_config->readPathEntry( "smb4k_mount" )+"\t$(Smb4KUsers)\tuid=root\tgid=root\tenv=PASSWD,USER" ); + #else + contents.append( "smb4k_kill\t"+m_config->readPathEntry( "smb4k_kill" )+"\t$(Smb4KUsers)\tuid=root\tgid=wheel" ); +- contents.append( "smb4k_umount\t"+m_config->readPathEntry( "smb4k_umount" )+"\t$(Smb4KUsers)\tuid=root\tgid=wheel" );item ++ contents.append( "smb4k_umount\t"+m_config->readPathEntry( "smb4k_umount" )+"\t$(Smb4KUsers)\tuid=root\tgid=wheel" ); + contents.append( "smb4k_mount\t"+m_config->readPathEntry( "smb4k_mount" )+"\t$(Smb4KUsers)\tuid=root\tgid=wheel\tsetenv=HOME=$CALLER_HOME\tenv=PASSWD,USER" ); + #endif + contents.append( "# End of Smb4K user entries." ); diff --git a/net/smb4k/files/smb2awk b/net/smb4k/files/smb2awk new file mode 100644 index 000000000000..cb8eec48172b --- /dev/null +++ b/net/smb4k/files/smb2awk @@ -0,0 +1,30 @@ +#!/usr/bin/awk -f +# AWK part for generating Windows/Samba boxes list in .nsmbrc format +# Incoming - findsmb output, outgoing - NetBIOS names list +# $Id: smb2awk,v 1.2 2003/10/30 09:41:10 shelton Exp $ + +{ + while ((getline nline) > 0) + { + if (substr(nline,1,1) == "-") + { + sig = 1 + continue + } + + if (sig == 0) + continue + else + { + split(nline,narray," ") + + if (narray[2] == "unknown") + next + else + if (index(narray[2],".") != 0) + next + else + print narray[2] + } + } +} diff --git a/net/smb4k/files/smb2nsmbrc b/net/smb4k/files/smb2nsmbrc new file mode 100644 index 000000000000..fd5f06e013b9 --- /dev/null +++ b/net/smb4k/files/smb2nsmbrc @@ -0,0 +1,43 @@ +#!/bin/sh +# Convert list of Windows/Samba boxes in local network to .nsmbrc format +# Args, if any passed directly to findsmb - network address and broadcast address +# $Id: smb2nsmbrc,v 1.4 2004/08/05 06:50:32 shelton Exp $ + +find="findsmb" # Script to display boxes list +util="smbutil" # Utility to convert plaintext password to hashed +outfile=".nsmbrctmp" # Generated file name + +# First, we check on presence findsmb +wfind=`whereis -b $find | awk '{print $2}'` + +if [ -z $wfind ]; then + echo FindSMB did not found in your system, please install samba package first + exit 5 +fi + +# Second, we check on presence smbutil +wutil=`whereis -b $util | awk '{print $2}'` + +if [ -z $wfind ]; then + echo SMBUtil did not found in your system, please install samba package first + exit 5 +fi + +# Now we ask username +echo -n "Please enter username (UPPER CASE!): " +read username + +# Now we ask password and crypt by smbutil +password=`$util crypt` + +# Now we detect all Windows/Samba boxes and taking their NetBIOS names +netnames=`findsmb $1 $2 | awk -f /usr/local/bin/smb2awk` + +# And at least we generating temporarly file with username, password and +# sections for all detected boxes +for netname in $netnames + do + echo "[$netname:$username]" >> $outfile + echo "password=$password" >> $outfile + echo "" >> $outfile + done diff --git a/net/smb4k/pkg-descr b/net/smb4k/pkg-descr new file mode 100644 index 000000000000..aaf80b8b5a9a --- /dev/null +++ b/net/smb4k/pkg-descr @@ -0,0 +1,18 @@ +Smb4K is an SMB share browser for KDE. Its features are inspired by Komba2 +by Frank Schwanz. It uses the Samba software suite for an easy access +to the SMB shares of your local network neighborhood. + +Features so far: + +- Scanning for (active) workgroups, hosts, and shares +- Mounting and unmounting of SMB shares, including unmounting all shares at once +- Access to the files of a mounted SMB share using Konqueror +- Auto-detection of external mounts/unmounts +- Mounting of recently used shares on start-up +- Miscellaneous infos about the SMB shares +- Basic network search +- WINS server support +- Preview of SMB shares +- Selectable look-up method + +WWW: http://smb4k.berlios.de diff --git a/net/smb4k/pkg-message b/net/smb4k/pkg-message new file mode 100644 index 000000000000..49dc2214d434 --- /dev/null +++ b/net/smb4k/pkg-message @@ -0,0 +1,22 @@ +*********************************************************** + +Please, read %%PREFIX%%/share/doc/HTML/en/smb4k/README.FreeBSD +*B*E*F*O*R*E* the FIRST RUN of SMB4K! + +In order to run SMB4K properly, be sure that: + +1. Your kernel is configured properly +2. Your /etc/nsmb.conf file is configured properly +3. Your .nsmbrc file is configured properly (this means, that + the password to *ANY* server in your network is recorded in + this file. For semi-automatic creation of .nsmbrc you can use + the smb2nsmbrc script) + +Keep in mind, that: + +1. SMB4K only calls smb4k_mount and smb4k_umount programs. +2. You can use the scripts that come with the port or create + your own. +3. DO NOT DISTURB ME ABOUT FreeBSD's SMB IMPLEMENTATION! + +************************************************************ diff --git a/net/smb4k/pkg-plist b/net/smb4k/pkg-plist new file mode 100644 index 000000000000..f70a53591af7 --- /dev/null +++ b/net/smb4k/pkg-plist @@ -0,0 +1,84 @@ +bin/smb2awk +bin/smb2nsmbrc +bin/smb4k +bin/smb4k_kill +bin/smb4k_mount +bin/smb4k_umount +include/smb4kappearanceoptions.h +include/smb4kauthinfo.h +include/smb4kauthoptions.h +include/smb4kbookmark.h +include/smb4kbookmarkeditor.h +include/smb4kbookmarkhandler.h +include/smb4kbookmarkmenuwidget.h +include/smb4kbrowserwidget.h +include/smb4kbrowserwidgetitem.h +include/smb4kcore.h +include/smb4kdefs.h +include/smb4kfileio.h +include/smb4kglobal.h +include/smb4kipfinder.h +include/smb4kmountdialog.h +include/smb4kmounter.h +include/smb4knetworkitems.h +include/smb4knetworkoptions.h +include/smb4knetworktab.h +include/smb4koptionsdlg.h +include/smb4kpasswordhandler.h +include/smb4kpreviewdialog.h +include/smb4kprint.h +include/smb4kprintdialog.h +include/smb4kprintinfo.h +include/smb4ksambaoptions.h +include/smb4kscanner.h +include/smb4ksearchtab.h +include/smb4kshare.h +include/smb4kshareoptions.h +include/smb4ksharetab.h +include/smb4ksharewidget.h +include/smb4kshellio.h +include/smb4ksuperuseroptions.h +include/smb4kuser.h +lib/kde3/konqsidebar_smb4k.so +lib/libsmb4kcore.a +lib/libsmb4kcore.so +lib/libsmb4kcore.so.0 +lib/libsmb4kwidgets.a +lib/libsmb4kwidgets.so +lib/libsmb4kwidgets.so.0 +share/applications/kde/smb4k.desktop +share/apps/konqsidebartng/add/smb4k_add.desktop +share/apps/smb4k/smb4kui.rc +share/icons/crystalsvg/16x16/apps/smb4k.png +share/icons/crystalsvg/32x32/apps/smb4k.png +share/icons/crystalsvg/48x48/apps/smb4k.png +share/icons/crystalsvg/64x64/apps/smb4k.png +share/locale/bg/LC_MESSAGES/smb4k.mo +share/locale/ca/LC_MESSAGES/smb4k.mo +share/locale/cs/LC_MESSAGES/smb4k.mo +share/locale/da/LC_MESSAGES/smb4k.mo +share/locale/de/LC_MESSAGES/smb4k.mo +share/locale/es/LC_MESSAGES/smb4k.mo +share/locale/fr/LC_MESSAGES/smb4k.mo +share/locale/hu/LC_MESSAGES/smb4k.mo +share/locale/is/LC_MESSAGES/smb4k.mo +share/locale/it/LC_MESSAGES/smb4k.mo +share/locale/ja/LC_MESSAGES/smb4k.mo +share/locale/nb/LC_MESSAGES/smb4k.mo +share/locale/nl/LC_MESSAGES/smb4k.mo +share/locale/nn/LC_MESSAGES/smb4k.mo +share/locale/pl/LC_MESSAGES/smb4k.mo +share/locale/pt_BR/LC_MESSAGES/smb4k.mo +share/locale/ru/LC_MESSAGES/smb4k.mo +share/locale/sk/LC_MESSAGES/smb4k.mo +share/locale/sv/LC_MESSAGES/smb4k.mo +share/locale/tr/LC_MESSAGES/smb4k.mo +share/locale/uk/LC_MESSAGES/smb4k.mo +share/locale/zh_CN/LC_MESSAGES/smb4k.mo +share/locale/zh_TW/LC_MESSAGES/smb4k.mo +%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD +%%PORTDOCS%%%%DOCSDIR%%/index.cache.bz2 +%%PORTDOCS%%%%DOCSDIR%%/index.docbook +%%PORTDOCS%%%%DOCSDIR%%/common +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm share/apps/smb4k |