Your message dated Fri, 11 Mar 2011 08:01:45 +0100
with message-id <[email protected]>
and subject line Issues induced by former fhs.patch are supposedly fixed
has caused the Debian Bug report #247163,
regarding samba: "cache dir" and "state dir" parameters in configuration
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
247163: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=247163
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: samba
Severity: wishlist
Tags: patch

 We needed to have two instances of Samba running in the same server (don't
ask why exactly, I'm not a sysadmin), and it was possible except that the
cache directory and state directory were hardwired at compile-time, and did
not have configuration parameters to change them.

 Below is a patch that adds "cache dir[ectory]" and "state dir[ectory]"
parameters. It would be highly appreciated if you could review and apply
this patch, or even submit it upstream :-) [Now that I'm looking at it
again, it probably needs some magic in configure.in so that these two
directives have sensible default values when --with-fhs is not used]

*** z-fix-fhs.patch
diff -urN --exclude='*~' samba-3.0.5-orig/source/Makefile.in 
samba-3.0.5/source/Makefile.in
--- samba-3.0.5-orig/source/Makefile.in 2004-08-25 09:02:52.000000000 +0000
+++ samba-3.0.5/source/Makefile.in      2004-08-25 09:13:21.000000000 +0000
@@ -1247,7 +1247,7 @@
 # is not used
 
 installdirs:
-       @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) 
$(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) 
$(DESTDIR)$(LOCKDIR) $(DESTDIR)$(MANDIR)
+       @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) 
$(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) 
$(DESTDIR)$(LOCKDIR) $(DESTDIR)$(CACHEDIR) $(DESTDIR)$(STATEDIR) 
$(DESTDIR)$(MANDIR)
 
 installservers: all installdirs
        @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) 
$(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(VARDIR) $(SBIN_PROGS)
@@ -1343,6 +1343,8 @@
        @echo "  privatedir:  $(PRIVATE_DIR)"
        @echo "  configdir:   $(CONFIGDIR)"
        @echo "  lockdir:     $(LOCKDIR)"
+       @echo "  cachedir:    $(CACHEDIR)"
+       @echo "  statedir:    $(STATEDIR)"
        @echo "  piddir:      $(PIDDIR)"
        @echo "  swatdir:     $(SWATDIR)"
 
diff -urN --exclude='*~' samba-3.0.5-orig/source/dynconfig.c 
samba-3.0.5/source/dynconfig.c
--- samba-3.0.5-orig/source/dynconfig.c 2004-08-25 09:02:52.000000000 +0000
+++ samba-3.0.5/source/dynconfig.c      2004-08-25 09:03:50.000000000 +0000
@@ -73,31 +73,10 @@
  * Not writable, but used to set a default in the parameter table.
  **/
 const pstring dyn_LOCKDIR = LOCKDIR;
+const pstring dyn_STATEDIR = STATEDIR;
+const pstring dyn_CACHEDIR = CACHEDIR;
 const pstring dyn_PIDDIR  = PIDDIR;
 
 const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE;
 const pstring dyn_PRIVATE_DIR = PRIVATE_DIR;
 
-
-/* In non-FHS mode, these should be configurable using 'lock dir =';
-   but in FHS mode, they are their own directory.  Implement as wrapper
-   functions so that everything can still be kept in dynconfig.c.
- */
-
-char *dyn_STATEDIR(void)
-{
-#ifdef FHS_COMPATIBLE
-       return STATEDIR;
-#else
-       return lp_lockdir();
-#endif
-}
-
-char *dyn_CACHEDIR(void)
-{
-#ifdef FHS_COMPATIBLE
-       return CACHEDIR;
-#else
-       return lp_lockdir();
-#endif
-}
diff -urN --exclude='*~' samba-3.0.5-orig/source/include/dynconfig.h 
samba-3.0.5/source/include/dynconfig.h
--- samba-3.0.5-orig/source/include/dynconfig.h 2004-08-25 09:02:52.000000000 
+0000
+++ samba-3.0.5/source/include/dynconfig.h      2004-08-25 09:07:42.000000000 
+0000
@@ -34,9 +34,8 @@
 extern pstring dyn_CODEPAGEDIR;
 extern const fstring dyn_SHLIBEXT;
 extern const pstring dyn_LOCKDIR; 
+extern const pstring dyn_CACHEDIR;
+extern const pstring dyn_STATEDIR;
 extern const pstring dyn_PIDDIR;
 extern const pstring dyn_SMB_PASSWD_FILE;
 extern const pstring dyn_PRIVATE_DIR;
-
-char *dyn_STATEDIR(void);
-char *dyn_CACHEDIR(void);
diff -urN --exclude='*~' samba-3.0.5-orig/source/lib/util.c 
samba-3.0.5/source/lib/util.c
--- samba-3.0.5-orig/source/lib/util.c  2004-08-25 09:02:52.000000000 +0000
+++ samba-3.0.5/source/lib/util.c       2004-08-25 09:08:57.000000000 +0000
@@ -2250,7 +2250,7 @@
 {
        static pstring fname;
 
-       pstrcpy(fname,dyn_STATEDIR());
+       pstrcpy(fname,lp_statedir());
        trim_string(fname,"","/");
 
        if (!directory_exist(fname,NULL)) {
@@ -2270,7 +2270,7 @@
 {
        static pstring fname;
 
-       pstrcpy(fname,dyn_CACHEDIR());
+       pstrcpy(fname,lp_cachedir());
        trim_string(fname,"","/");
 
        if (!directory_exist(fname,NULL)) {
diff -urN --exclude='*~' samba-3.0.5-orig/source/nmbd/nmbd_serverlistdb.c 
samba-3.0.5/source/nmbd/nmbd_serverlistdb.c
--- samba-3.0.5-orig/source/nmbd/nmbd_serverlistdb.c    2004-08-25 
09:02:52.000000000 +0000
+++ samba-3.0.5/source/nmbd/nmbd_serverlistdb.c 2004-08-25 09:08:21.000000000 
+0000
@@ -327,7 +327,7 @@
 
        updatecount++;
     
-       pstrcpy(fname,dyn_CACHEDIR());
+       pstrcpy(fname,lp_cachedir());
        trim_char(fname,'\0' ,'/');
        pstrcat(fname,"/");
        pstrcat(fname,SERVER_LIST);
diff -urN --exclude='*~' samba-3.0.5-orig/source/nmbd/nmbd_winsserver.c 
samba-3.0.5/source/nmbd/nmbd_winsserver.c
--- samba-3.0.5-orig/source/nmbd/nmbd_winsserver.c      2004-08-25 
09:02:52.000000000 +0000
+++ samba-3.0.5/source/nmbd/nmbd_winsserver.c   2004-08-25 09:08:56.000000000 
+0000
@@ -1805,7 +1805,7 @@
                }
        }
 
-       slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST);
+       slprintf(fname,sizeof(fname)-1,"%s/%s", lp_statedir(), WINS_LIST);
        all_string_sub(fname,"//", "/", 0);
        slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned 
int)sys_getpid());
 
diff -urN --exclude='*~' samba-3.0.5-orig/source/param/loadparm.c 
samba-3.0.5/source/param/loadparm.c
--- samba-3.0.5-orig/source/param/loadparm.c    2004-08-25 09:02:53.000000000 
+0000
+++ samba-3.0.5/source/param/loadparm.c 2004-08-25 09:16:00.000000000 +0000
@@ -104,10 +104,9 @@
        char *szAddPrinterCommand;
        char *szDeletePrinterCommand;
        char *szOs2DriverMap;
-#ifdef FHS_COMPATIBLE
-       char *szLockDirStub;
-#endif
        char *szLockDir;
+       char *szCacheDir;
+       char *szStateDir;
        char *szPidDir;
        char *szRootdir;
        char *szDefaultService;
@@ -1094,13 +1093,12 @@
        {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, 
FLAG_HIDE}, 
        {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 
FLAG_ADVANCED}, 
        {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, 
NULL, FLAG_ADVANCED}, 
-#ifdef FHS_COMPATIBLE
-       {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, 
NULL, 0}, 
-       {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0},
-#else
        {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 
FLAG_ADVANCED}, 
        {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 
FLAG_HIDE}, 
-#endif
+       {"cache directory", P_STRING, P_GLOBAL, &Globals.szCacheDir, NULL, 
NULL, FLAG_ADVANCED}, 
+       {"cache dir", P_STRING, P_GLOBAL, &Globals.szCacheDir, NULL, NULL, 
FLAG_HIDE}, 
+       {"state directory", P_STRING, P_GLOBAL, &Globals.szStateDir, NULL, 
NULL, FLAG_ADVANCED}, 
+       {"state dir", P_STRING, P_GLOBAL, &Globals.szStateDir, NULL, NULL, 
FLAG_HIDE}, 
        {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, 
FLAG_ADVANCED}, 
 #ifdef WITH_UTMP
        {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 
FLAG_ADVANCED}, 
@@ -1352,6 +1350,8 @@
        string_set(&Globals.szPrintcapname, PRINTCAP_NAME);
        string_set(&Globals.szPidDir, dyn_PIDDIR);
        string_set(&Globals.szLockDir, dyn_LOCKDIR);
+       string_set(&Globals.szCacheDir, dyn_CACHEDIR);
+       string_set(&Globals.szStateDir, dyn_STATEDIR);
        string_set(&Globals.szSocketAddress, "0.0.0.0");
        pstrcpy(s, "Samba ");
        pstrcat(s, SAMBA_VERSION_STRING);
@@ -1630,6 +1630,8 @@
 FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand)
 FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap)
 FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir)
+FN_GLOBAL_STRING(lp_cachedir, &Globals.szCacheDir)
+FN_GLOBAL_STRING(lp_statedir, &Globals.szStateDir)
 FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir)
 FN_GLOBAL_STRING(lp_mangling_method, &Globals.szManglingMethod)
 FN_GLOBAL_INTEGER(lp_mangle_prefix, &Globals.mangle_prefix)
diff -urN --exclude='*~' samba-3.0.5-orig/source/script/mkbuildoptions.awk 
samba-3.0.5/source/script/mkbuildoptions.awk
--- samba-3.0.5-orig/source/script/mkbuildoptions.awk   2004-07-20 
16:28:16.000000000 +0000
+++ samba-3.0.5/source/script/mkbuildoptions.awk        2004-08-25 
09:09:46.000000000 +0000
@@ -87,6 +87,8 @@
        print "       output(screen,\"   SHLIBEXT: %s\\n\",dyn_SHLIBEXT);";
 
        print "       output(screen,\"   LOCKDIR: %s\\n\",dyn_LOCKDIR);";
+       print "       output(screen,\"   CACHEDIR: %s\\n\",dyn_CACHEDIR);";
+       print "       output(screen,\"   STATEDIR: %s\\n\",dyn_STATEDIR);";
        print "       output(screen,\"   PIDDIR: %s\\n\", dyn_PIDDIR);";
 
        print "       output(screen,\"   SMB_PASSWD_FILE: 
%s\\n\",dyn_SMB_PASSWD_FILE);";

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.18-grsec-1.9.4
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to gl_ES@euro)


--- End Message ---
--- Begin Message ---
During last years, we worked with upstream to drop nearly all
fhs.patch.

I think that, by doing this, we progressively restored the
funtionality bringed by "lock dir" et al.

Please open a new bug report if that's untrue.


-- 


Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to