makefile and path questions

Inge-Haavard Hunstad Inge-Havard.Hunstad at cc.uit.no
Thu Jan 14 13:48:06 GMT 1999


Hi all

Thanks Mark for bringing up a long lost discussion.

Mark Harber wrote:

> I'd suggest changing the layout.
> 
> ETCDIR (/etc)
>   smb.conf
>   lmhosts
>   printers.def
>   smbpasswd (password file)
> LIBDIR (/usr/local/samba/lib)
>   codepages/ (code pages)
> VARDIR (/var/log/samba)
>   log.smb (maybe renamed to smblog)
>   log.nmb (maybe renamed to nmblog)
> /var/lock/[samba?] (lock files)
> 
> Would this layout prove sensible as a standard for "my" installation?
> Who would do it differently? I'd appreciate any comments.

I also wonder why they use static directories in Makefile.in, although I
have not seen it in 2.0.0beta5 where they have used some kind of dynamic
code, although I still have to patch the Makefile.in. The problem is the
codepages that I feel is not read-only single-machine but read-only
architecture-independent therefore I made a patch to fix this problem.

Here is my patch, feel free to reuse it.

--- src-2.0.0beta5/source/Makefile.in   Thu Dec 31 02:36:40 1998
+++ src-2.0.0beta5-386linuxlibc6/source/Makefile.in     Thu Jan 14 10:06:36 1999
@@ -26,6 +26,8 @@
 # we don't use sbindir because we want full compatibility with
 # the previous releases of Samba
 SBINDIR = @bindir@
+DATADIR = @datadir@
+ETCDIR = @sysconfdir@
 LIBDIR = @libdir@
 VARDIR = @localstatedir@
 MANDIR = @mandir@
@@ -38,10 +40,13 @@
 # or in smb.conf (see smb.conf(5))
 SMBLOGFILE = $(VARDIR)/log.smb
 NMBLOGFILE = $(VARDIR)/log.nmb
-CONFIGFILE = $(LIBDIR)/smb.conf
-LMHOSTSFILE = $(LIBDIR)/lmhosts
-DRIVERFILE = $(LIBDIR)/printers.def
-PASSWD_PROGRAM = /bin/passwd
+CONFIGFILE = $(ETCDIR)/smb.conf
+LMHOSTSFILE = $(ETCDIR)/lmhosts
+DRIVERFILE = $(ETCDIR)/printers.def
+
+# Because RHLinux5.2 wants it like this
+PASSWD_PROGRAM = /usr/bin/passwd
+
 # This is where smbpasswd et al go
 PRIVATEDIR = @privatedir@
 
@@ -55,7 +60,7 @@
 LOCKDIR = $(VARDIR)/locks
 
 # The directory where code page definition files go
-CODEPAGEDIR = $(LIBDIR)/codepages
+CODEPAGEDIR = $(DATADIR)/codepages
 
 # The current codepage definition list.
 CODEPAGELIST= 437 737 850 852 861 932 866 949 950 936

-------------------------------------------------------

When I run configure I use these options:

--prefix=/store/samba --sysconfdir=/etc --localstatedir=/var/log/samba
--datadir=/store/samba/lib --libdir=/store/samba/lib --with-privatedir=/etc
--with-swatdir=/store/samba/swat

At our system we use store, which is a system created to maintain and keep
different versions under different architectures in a hetrogeneous
network. More information about store is available at:
http://www.pvv.org/~arnej/store/storedoc.html

Inge



More information about the samba mailing list