sakw
October 31st, 2006, 05:36 AM
First, I can't build amanda if I
./configure ... --without-debugging
I tracked it down to a missing macro in common-src/amanda.h and a missing declaration in restore-src/amidxtaped.c. The following patches below worked for me.
Second, it would be good if amanda was built with debugging compiled in, but run with debugging off (unless there was a problem). The doc'n for amanda.conf in http://wiki.zmanda.com/index.php/Amanda.conf (and the corresponding page for amanda-client.conf) describes several debug_XXX options that looked like they might do the trick, but, alas!, they don't work when I tried. Is this work-in-progress?
I suggest that there be some kind of master switch that turns debug on/off plus individual over-rides per module.
Thanks
--- common-src/amanda.h-debug 2006-10-31 13:35:45.000000000 +0000
+++ common-src/amanda.h 2006-10-31 13:35:58.000000000 +0000
@@ -428,6 +428,7 @@
#else /* }{ */
# define dbopen(a)
# define dbreopen(a,b)
+# define dbrename(a,b)
# define dbclose()
# define dbprintf(p)
# define dbfd() (-1)
--- restore-src/amidxtaped.c-debug 2006-10-31 13:36:56.000000000 +0000
+++ restore-src/amidxtaped.c 2006-10-31 13:37:44.000000000 +0000
@@ -245,6 +245,9 @@
char *conf_tapetype;
tapetype_t *tape;
char *line;
+#ifndef DEBUG_CODE
+ int i;
+#endif
safe_fd(DATA_FD_OFFSET, 4);
safe_cd();
---------
./configure ... --without-debugging
I tracked it down to a missing macro in common-src/amanda.h and a missing declaration in restore-src/amidxtaped.c. The following patches below worked for me.
Second, it would be good if amanda was built with debugging compiled in, but run with debugging off (unless there was a problem). The doc'n for amanda.conf in http://wiki.zmanda.com/index.php/Amanda.conf (and the corresponding page for amanda-client.conf) describes several debug_XXX options that looked like they might do the trick, but, alas!, they don't work when I tried. Is this work-in-progress?
I suggest that there be some kind of master switch that turns debug on/off plus individual over-rides per module.
Thanks
--- common-src/amanda.h-debug 2006-10-31 13:35:45.000000000 +0000
+++ common-src/amanda.h 2006-10-31 13:35:58.000000000 +0000
@@ -428,6 +428,7 @@
#else /* }{ */
# define dbopen(a)
# define dbreopen(a,b)
+# define dbrename(a,b)
# define dbclose()
# define dbprintf(p)
# define dbfd() (-1)
--- restore-src/amidxtaped.c-debug 2006-10-31 13:36:56.000000000 +0000
+++ restore-src/amidxtaped.c 2006-10-31 13:37:44.000000000 +0000
@@ -245,6 +245,9 @@
char *conf_tapetype;
tapetype_t *tape;
char *line;
+#ifndef DEBUG_CODE
+ int i;
+#endif
safe_fd(DATA_FD_OFFSET, 4);
safe_cd();
---------