Ticket #2419 (closed defect: fixed)
configure script for mc-4.7.4 fails to set samba configdir
Reported by: | jimklimov | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.7.5 |
Component: | mc-vfs | Version: | 4.7.4 |
Keywords: | mc-vfs samba configdir | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
I am building mc-4.7.4 and mc-4.7.0.9 on Solaris (Sol 10 x86/SPARC).
I found that mc-4.7.4 (*unlike* mc-4.7.0.9) config script fails to replace "@configdir@" with the default path (/etc) or one explicitly provided with options
--with-smb-configdir=/etc --with-configdir=/etc
regardless - whether used alone or both at once.
As a result, the value hardcoded in the "mc" binary is
"@configdir@/smb.conf".
My current workaround is to manually fix lib/vfs/mc-vfs/Makefile around line 396 after running "./configure" before running "make":
-SAMBA_CFLAGS = -DCONFIGDIR=\""@configdir@"\"
+SAMBA_CFLAGS = -DCONFIGDIR=\""/etc"\"
Attachments
Change History
comment:2 follow-up: ↓ 3 Changed 14 years ago by jimklimov
Well, the patch almost applies. Apparently your source version differs from mc-4.7.4 archive?
In my case the file "mc-vfs-samba.m4" ends with:
AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"])
and the patch expects that to be
AM_CONDITIONAL([ENABLE_VFS_SMB], [test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" = x"yes"])
And apparently, Makefile.in (not only Makefile.am) files in lib/vfs/mc-vfs/samba/ and lib/vfs/mc-vfs/ should also be updated to use @smbconfigdir@ instead of @configdir@
But even so, at least in my case the problem remains in place. The generated final Makefile contains wrong strings:
$ grep configdir mc-4.7.4/lib/vfs/mc-vfs/samba/Makefile
CONFIGFILE = @smbconfigdir@/smb.conf
LMHOSTSFILE = @smbconfigdir@/lmhosts
These should have been real paths, like in mc-4.7.0.x:
$ egrep 'smb.conf|lmhosts' mc-4.7.0.10/lib/vfs/mc-vfs/samba/Makefile
# or in smb.conf (see smb.conf(5))
CONFIGFILE = /etc/smb.conf
LMHOSTSFILE = /etc/lmhosts
Something broke in the "replacer" which changes the @tag@ blocks, and it only occurs to this one tag. :\
comment:3 in reply to: ↑ 2 Changed 14 years ago by andrew_b
Replying to jimklimov:
Well, the patch almost applies. Apparently your source version differs from mc-4.7.4 archive?
In my case the file "mc-vfs-samba.m4" ends with:
AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"])
and the patch expects that to be
AM_CONDITIONAL([ENABLE_VFS_SMB], [test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" = x"yes"])
This is patch for recent master. I'll provide a patch for 4.7.4 asap.
And apparently, Makefile.in (not only Makefile.am) files in lib/vfs/mc-vfs/samba/ and lib/vfs/mc-vfs/ should also be updated to use @smbconfigdir@ instead of @configdir@
No.
But even so, at least in my case the problem remains in place. The generated final Makefile contains wrong strings:
$ grep configdir mc-4.7.4/lib/vfs/mc-vfs/samba/Makefile
CONFIGFILE = @smbconfigdir@/smb.conf
LMHOSTSFILE = @smbconfigdir@/lmhosts
Leave @configdir@ here.
Changed 14 years ago by andrew_b
- Attachment 2419_smbconfigdir_4.7.4.patch added
Patch for 4.7.4 release
Changed 14 years ago by andrew_b
- Attachment 2419_smbconfigdir_master.patch added
Patch for master branch
comment:4 Changed 14 years ago by andrew_b
I've attached two patches: for 4.7.4 release and for current 'master' branch.
comment:5 follow-up: ↓ 6 Changed 14 years ago by jimklimov
These didn't help either :(
I tried comparing Makefiles and configure scripts in 4.7.0.10 and 4.7.4 versions, and it seems that while renaming the configure key (--enable-vfs-smb vs. --with-samba) the keys for [smb]configdir and codepagedit were lost altogether.
In 4.7.0.x generated Makefiles have lines line
configdir = @configdir@
and in 4.7.4 no such lines... maybe that's the culprit? :\
comment:6 in reply to: ↑ 5 Changed 14 years ago by andrew_b
Replying to jimklimov:
These didn't help either :(
What do you mean exactly?
I tried comparing Makefiles and configure scripts in 4.7.0.10 and 4.7.4 versions, and it seems that while renaming the configure key (--enable-vfs-smb vs. --with-samba) the keys for [smb]configdir and codepagedit were lost altogether.
In 4.7.0.x generated Makefiles have lines line
configdir = @configdir@
and in 4.7.4 no such lines... maybe that's the culprit? :\
Now configdir is a variable in lib/vfs/mc-vfs/samba locally. Global variable is named smbconfigdir now. I renamed previous global configdir to smbconfigdir to avoid possible confuse and to be matched with name of --with-smb-condigdir option. In all Makefiles.in exculding lib/vfs/mc-vfs/samba/Makefile.in you can find
smbconfigdir = @smbconfigdir@
comment:7 Changed 14 years ago by jimklimov
Exactly - I've tried to set in Makefile.am all the ways I thought of to set this definition, ending up with this monster:
if ENABLE_VFS_SMB
SAMBA_CFLAGS1 = -DCONFIGDIR=\""@smbconfigdir@"\"
SAMBA_CFLAGS2 = -DCONFIGDIR=\""@configdir@"\"
SAMBA_CFLAGS3 = -DCONFIGDIR=\""@SMBCONFIGDIR@"\"
SAMBA_CFLAGS = $(SAMBA_CFLAGS1)
SAMBA_SUBDIRS = samba
endif
All of these strings make it into the final Makefile unchanged.
Well, if it's only broken for me and works at least for you in the master branch - I'll see if it "magically" begins working in 4.7.5 release ;)
Or if anyone else complains into this ticket.
Maybe my hands are too "curly" these days...
comment:9 Changed 14 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- severity changed from no branch to on review
- Milestone changed from 4.7 to 4.7.5
Created 2419_smb_configdir branch. Parent branch is master.
changeset:6d1405a5973c143d45bffc5a43eca990c0096670
comment:10 Changed 14 years ago by andrew_b
comment:13 Changed 14 years ago by angel_il
- Votes for changeset changed from slavazanko to slavazanko angel_il
- severity changed from on review to approved
comment:14 Changed 14 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko angel_il to committed-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:72ee546a59ea21b715152e5279ca41c24958d7e2
comment:15 Changed 14 years ago by andrew_b
- Status changed from testing to closed
- Blocking 2409 removed
Would you try the 2419_smbconfigdir.patch patch?