Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28122 - mc's built-in samba library if out of date
Summary: mc's built-in samba library if out of date
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-07 11:17 UTC by Michal Januszewski (RETIRED)
Modified: 2003-09-22 06:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Januszewski (RETIRED) gentoo-dev 2003-09-07 11:17:36 UTC
Midnight Commander has a built-in samba library which is used to access data
across smb links. This library is taken from an old samba version. This can
cause problems since things change as time goes on. For example - current samba
version supports something like: "interface = eth1" in smb.conf, the version
included in mc does not. This leads to calling gethostname("eth1") 3 times at
startup. Recently I have had some problems with the DNS servers I use. I had to
wait 3 minutes (!) before mc started because it tried to resolve "eth1" (2 times
) and "ETH1" (which of course wasn't possible because of the DNS server failure).

I have created this patch for mc:
http://www.spock.mga.com.pl/public/gentoo/mc-4.6.0-samba.patch.bz2 
(sorry to put it on an external site but since it's almost 600kb, I didn't want
to upload it to Gentoo Bugzilla). It updates mc's samba libraries to 2.2.8a. By
doing so it automatically fixes problems described in bug #27212 (which so far
required a rather dirty hack).

Reproducible: Always
Steps to Reproduce:
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2003-09-07 11:46:52 UTC
One more thing. I have just noticed that mc ebuild has "samba? ( >=net-fs/samba-2.2.3a-r1 )" in its DEPEND. I'm not exactly sure this is necessary since mc uses its own built-in libs. Anyone _not_ using samba could check if smb links work in mc?
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-07 14:47:54 UTC
can you please open a bug on the mc bug tracker as well:

https://savannah.gnu.org/bugs/?group=mc
Comment 3 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-07 14:52:42 UTC
> I'm not exactly sure this is necessary since mc uses its own built-in
libs.

So can't we link to the installed samba version?
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2003-09-08 07:03:37 UTC
I'll add at bug @ gnu.org soon. As for the samba libs, I believe it was the intention of mc devs to provide it with its own samba code so that mc could be use d to access smb shares on systems with no samba installed. Just as for using an FTP link in mc one doesn't need proftpd (or any other ftp-related software), one does not need samba to use a SMB link. This approach seems quite reasonable for me. 

To answer your question about linking against installed samba libs, I suppose this could be done. The point is - do we need it and do we want it? I think I could do some hacking and prepare a new patch for mc to allow it to use external samba libs but I would have to be assured that the patch would actually be used :) (this would mean dropping the built-in samba libs for good in Gentoo).
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-08 09:31:56 UTC
i would prefer using the shared samba libs
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2003-09-08 09:47:27 UTC
Ok then, I guess I'll make another patch soon. Perhaps by that time mc with this new built-in library should be tested? If any problems arise with built-in lib, they will most probably still be there when a shared lib is used.

And one more thing - if we are to use shared libs for mc, the code might require maintenance from time to time. I'll try to provide it for as long as possible but shall I not be able to do so, will there be anyone to continue this?
Comment 7 Michal Januszewski (RETIRED) gentoo-dev 2003-09-09 10:15:59 UTC
Ok, here it is: http://www.spock.mga.com.pl/public/gentoo/mc-4.6.0-sambalib.patch.bz2

I have tested it with samba 2.2.8a - works fine, and mc is smaller :)
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-11 02:56:28 UTC
thx, this is a pretty big patch, must it be sooo big?
Comment 9 Michal Januszewski (RETIRED) gentoo-dev 2003-09-11 06:42:58 UTC
Actually it doesn't have to. I have managed to bring it down to ca. 300kb  (bzipped) and I think this is pretty much everything I can do for now.
Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-15 12:13:18 UTC
thx, will make an ebuild later this week
Comment 11 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-21 08:51:10 UTC
-r3 now out :)
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-22 06:29:27 UTC
forgot to close it ;)