Proposed paths for Samba 4.0

Stefan (metze) Metzmacher metze at samba.org
Tue Jul 12 14:13:38 MDT 2011


Am 12.07.2011 18:59, schrieb Luk Claes:
> On 07/12/2011 06:44 PM, Stefan (metze) Metzmacher wrote:
>> Am 23.06.2011 12:06, schrieb Andrew Bartlett:
>>> On Wed, 2011-06-22 at 18:39 +0200, Stefan (metze) Metzmacher wrote:
>>>> Am 21.06.2011 18:26, schrieb Stefan (metze) Metzmacher:
> 
>>>>>> What exactly should --enable-fhs do?
>>>>>>
>>>>>> Which paths should it change, what should they be changed to, and what
>>>>>> priority order (enable-fhs, gnu options, with options) should apply?
>>>>>
>>>>> I'll propose some patches in the next days.
>>>>
>>>> Here's my branch...
>>>>
>>>> http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-dynconfig
> 
>>> I look forward to seeing the details. 
>>>
>>> One concern that I have is that we are back to having
>>> users/distributions able to specify very many individual paths. 
>>>
>>> If we want uniform behaviour from our users and distributors, then it
>>> would be worth reducing the number of things that they can set, and that
>>> we have to test.  That's why I did --with-sockets-dir for example, which
>>> allows us to add more sockets without adding more parameters that
>>> distributions have to keep up with. 
>>
>> Ok, I've removed some of the options again.
>>
>> I'd propose the following patches.
> 
>> -    'with-lockdir'                        : [
> '${LOCALSTATEDIR}/lock', 'where to put short term disposable state files' ],
>> -    'with-cachedir'                       : [
> '${LOCALSTATEDIR}/cache', 'where to put cache files' ],
>> +    'with-lockdir'                        : [
> '${LOCALSTATEDIR}/locks', 'where to put short term disposable state
> files' ],
>> +    'with-cachedir'                       : [
> '${LOCALSTATEDIR}/locks', 'where to put cache files' ],
> 
> In a distribution ${LOCALSTATEDIR} would typically be /var. /var/lock
> and /var/cache seem very sane to me, though /var/locks would be a new
> directory, so would mean we have to change both defaults in any case...

That part of the patch is just a revert, what I propose is this:

+# list of directory options to offer in configure
+#
+# 'STD' - the default path without --enable-fhs
+# 'FHS' - the default path with --enable-fhs
+#
+# 'OPT' - the configure option to overwrite the default (optional)
+# 'TXT' - the help text of the configure option (optional)
+#
+# 'OVW' - The option referrs to itself and was already from
+#         the basic GNU options from the gnu_dirs tool.
+#         We may overwrite the related path. (Default: False)
+#
+# 'DLY' - The option referrs to other options in the dynconfig list.
+#         We delay the intialization into a later stage. This
+#         makes sure the recursion works. (Default: False)
+#
+dynconfig = {
+    'BINDIR' : {
+         'STD': '${BINDIR}',
+         'FHS': '${BINDIR}',
+         'OVW': True,
+    },
+    'SBINDIR' : {
+         'STD': '${SBINDIR}',
+         'FHS': '${SBINDIR}',
+         'OVW': True,
+    },
+    'LIBDIR' : {
+         'STD': '${LIBDIR}',
+         'FHS': '${LIBDIR}',
+         'OVW': True,
+    },
+    'LIBEXECDIR' : {
+         'STD': '${LIBEXECDIR}',
+         'FHS': '${LIBEXECDIR}',
+         'OVW': True,
+    },
+    'DATADIR' : {
+         'STD': '${DATADIR}',
+         'FHS': '${DATADIR}',
+         'OVW': True,
+    },
+    'LOCALEDIR' : {
+         'STD': '${LOCALEDIR}',
+         'FHS': '${LOCALEDIR}',
+         'OVW': True,
+    },
+    'PYTHONDIR' : {
+         'STD': '${PYTHONDIR}',
+         'FHS': '${PYTHONDIR}',
+         'OVW': True,
+    },
+    'PYTHONARCHDIR' : {
+         'STD': '${PYTHONARCHDIR}',
+         'FHS': '${PYTHONARCHDIR}',
+         'OVW': True,
+    },
+    'MODULESDIR' : {
+         'STD': '${MODULESDIR}',
+         'FHS': '${MODULESDIR}/samba',
+         'OVW': True,
+    },
+    'INCLUDEDIR' : {
+         'STD': '${INCLUDEDIR}',
+         'FHS': '${INCLUDEDIR}/samba-4.0',
+         'OVW': True,
+    },
+    'SCRIPTSBINDIR' : {
+         'STD': '${SBINDIR}',
+         'FHS': '${SBINDIR}',
+    },
+    'SETUPDIR' : {
+         'STD': '${DATADIR}/setup',
+         'FHS': '${DATADIR}/samba/setup',
+    },
+    'PKGCONFIGDIR' : {
+         'STD': '${LIBDIR}/pkgconfig',
+         'FHS': '${LIBDIR}/pkgconfig',
+    },
+    'SWATDIR' : {
+         'STD': '${DATADIR}/swat',
+         'FHS': '${DATADIR}/samba/swat',
+    },
+    'CODEPAGEDIR' : {
+         'STD': '${DATADIR}/codepages',
+         'FHS': '${DATADIR}/samba/codepages',
+    },
+    'PAMMODULESDIR' : {
+         'STD': '${LIBDIR}',
+         'FHS': '${LIBDIR}',
+         'OPT': '--with-pammodulesdir',
+         'TXT': 'Which directory to use for PAM modules',
+    },
+    'CONFIGDIR' : {
+         'STD': '${SYSCONFDIR}',
+         'FHS': '${SYSCONFDIR}/samba',
+         'OPT': '--with-configdir',
+         'TXT': 'Where to put configuration files',
+    },
+    'PRIVATE_DIR' : {
+         'STD': '${PREFIX}/private',
+         'FHS': '${LOCALSTATEDIR}/lib/samba/private',
+         'OPT': '--with-privatedir',
+         'TXT': 'Where to put sam.ldb and other private files',
+    },
+    'LOCKDIR' : {
+         'STD': '${LOCALSTATEDIR}/lock',
+         'FHS': '${LOCALSTATEDIR}/lock/samba',
+         'OPT': '--with-lockdir',
+         'TXT': 'Where to put short term disposable state files',
+    },
+    'PIDDIR' : {
+         'STD': '${LOCALSTATEDIR}/run',
+         'FHS': '${LOCALSTATEDIR}/run/samba',
+         'OPT': '--with-piddir',
+         'TXT': 'Where to put pid files',
+    },
+    'STATEDIR' : {
+         'STD': '${LOCALSTATEDIR}/locks',
+         'FHS': '${LOCALSTATEDIR}/lib/samba/',
+         'OPT': '--with-statedir',
+         'TXT': 'Where to put persistent state files',
+    },
+    'CACHEDIR' : {
+         'STD': '${LOCALSTATEDIR}/cache',
+         'FHS': '${LOCALSTATEDIR}/cache/samba',
+         'OPT': '--with-cachedir',
+         'TXT': 'Where to put temporary cache files',
+    },
+    'LOGFILEBASE' : {
+         'STD': '${LOCALSTATEDIR}',
+         'FHS': '${LOCALSTATEDIR}/log/samba',
+         'OPT': '--with-logfilebase',
+         'TXT': 'Where to put log files',
+    },
+    'SOCKET_DIR' : {
+         'STD': '${LOCALSTATEDIR}/run',
+         'FHS': '${LOCALSTATEDIR}/run/samba',
+         'OPT': '--with-sockets-dir',
+         'TXT': 'socket directory',
+    },
+    'PRIVILEGED_SOCKET_DIR' : {
+         'STD': '${LOCALSTATEDIR}/lib',
+         'FHS': '${LOCALSTATEDIR}/lib/samba',
+         'OPT': '--with-privileged-socket-dir',
+         'TXT': 'privileged socket directory',
+    },
+    'WINBINDD_SOCKET_DIR' : {
+         'STD': '${SOCKET_DIR}/winbindd',
+         'FHS': '${SOCKET_DIR}/winbindd',
+         'DLY': True,
+    },
+    'WINBINDD_PRIVILEGED_SOCKET_DIR' : {
+         'STD': '${PRIVILEGED_SOCKET_DIR}/winbindd_privileged',
+         'FHS': '${PRIVILEGED_SOCKET_DIR}/winbindd_privileged',
+         'DLY': True,
+    },
+    'NMBDSOCKETDIR' : {
+         'STD': '${SOCKET_DIR}/nmbd',
+         'FHS': '${SOCKET_DIR}/nmbd',
+         'DLY': True,
+    },
+    'NTP_SIGND_SOCKET_DIR' : {
+         'STD': '${SOCKET_DIR}/ntp_signd',
+         'FHS': '${SOCKET_DIR}/ntp_signd',
+         'DLY': True,
+    },
+    'NCALRPCDIR' : {
+         'STD': '${SOCKET_DIR}/ncalrpc',
+         'FHS': '${SOCKET_DIR}/ncalrpc',
+         'DLY': True,
+    },
+    'CONFIGFILE' : {
+         'STD': '${CONFIGDIR}/smb.conf',
+         'FHS': '${CONFIGDIR}/smb.conf',
+         'DLY': True,
+    },
+    'LMHOSTSFILE' : {
+         'STD': '${CONFIGDIR}/lmhosts',
+         'FHS': '${CONFIGDIR}/lmhosts',
+         'DLY': True,
+    },
+    'SMB_PASSWD_FILE' : {
+         'STD': '${PRIVATE_DIR}/smbpasswd',
+         'FHS': '${PRIVATE_DIR}/smbpasswd',
+         'DLY': True,
+    },
+}

> All the socket dirs, we probably move to (some subdir of) /run in the
> future.

But /var/run is a bind mount into /run, so I think /var/run/samba is a
good default.
We have --with-socket-dir, which allow you to change it.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110712/83f1d167/attachment.pgp>


More information about the samba-technical mailing list