pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: amanda 3 with scsi tape?



Greg Troxel <gdt%ir.bbn.com@localhost> writes:

> I just updated a machine to amanda 3.3.1 (which should be updated) via
> pkgsrc on an up-to-date netbsd-5 amd64 system.  The amanda.conf has:
>
>   tapedev "/dev/nrst0"
>
> and I get
>
>   ERROR: chg-single: error opening device '/dev/nrst0': "/dev/nrst0" is not a valid device name.
>
> This is an LTO2 scsi drive, and it seems to be working fine (I can use
> "mt fsf" etc. on it).
>
> Is anyone successfully running an amanda server?  Does your tapedev look
> different?

I am now pretty sure that no one on NetBSD is successfully using tapes
with amanda 3.3.  I have the following patch, which I've sent upstream
for discussion.  The problem is that the autoconf checks for  mtio.h
etc. fail to include sys/types.h and sys/time.h, causing spurious
compile failures, and then amanda builds without tape drive support.

Is sys/time.h a sufficiently universal header that it's ok to just
include it?  (As in, is there any platform on which amanda 3 from pkgsrc
builds that lacks it?)


$NetBSD$

--- config/amanda/tape.m4.orig	2012-02-21 11:36:49.000000000 +0000
+++ config/amanda/tape.m4
@@ -34,6 +34,8 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
     # check for MTIOCTOP, an indicator of POSIX tape support
     AC_CACHE_CHECK([for MTIOCTOP], amanda_cv_HAVE_MTIOCTOP,[
 	AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/time.h>
 #ifdef HAVE_SYS_TAPE_H
 # include <sys/tape.h>
 #endif
@@ -66,6 +68,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/mtio.h>
 	]], [[
 	    struct mtget buf;
@@ -85,6 +88,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/mtio.h>
 	]], [[
 	    struct mtget buf;
@@ -139,6 +143,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/mtio.h>
 	]], [[
 	    struct mtget buf;

Attachment: pgpIYkmPVX_Vf.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index