Skip to content

Commit 8613ff9

Browse files
committed
Third party tape backends for LTFS
For now, we only have NetBSD port of HPE LTFS 4.3.1 ltotape
0 parents  commit 8613ff9

26 files changed

+6443
-0
lines changed

Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ACLOCAL_AMFLAGS = -I m4
2+
3+
nobase_pkginclude_HEADERS = config.h
4+
5+
SUBDIRS = messages src/tape_drivers/netbsd/ltotape
6+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ltfs-backends

autogen.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/sh
2+
#
3+
#
4+
# OO_Copyright_BEGIN
5+
#
6+
#
7+
# Copyright 2010, 2018 IBM Corp. All rights reserved.
8+
#
9+
# Redistribution and use in source and binary forms, with or without
10+
# modification, are permitted provided that the following conditions
11+
# are met:
12+
# 1. Redistributions of source code must retain the above copyright
13+
# notice, this list of conditions and the following disclaimer.
14+
# 2. Redistributions in binary form must reproduce the above copyright
15+
# notice, this list of conditions and the following disclaimer in the
16+
# documentation and/or other materials provided with the distribution.
17+
# 3. Neither the name of the copyright holder nor the names of its
18+
# contributors may be used to endorse or promote products derived from
19+
# this software without specific prior written permission.
20+
#
21+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
22+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+
# POSSIBILITY OF SUCH DAMAGE.
32+
#
33+
#
34+
# OO_Copyright_END
35+
#
36+
37+
# Bootstrap LTFS
38+
39+
mkdir -p build-aux
40+
41+
aclocal
42+
43+
if [ -x /usr/local/bin/glibtoolize ]; then
44+
glibtoolize
45+
else
46+
libtoolize
47+
fi
48+
49+
autoconf
50+
autoheader
51+
automake --add-missing --copy

configure.ac

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# -*- Autoconf -*-
2+
# Process this file with autoconf to produce a configure script.
3+
4+
AC_PREREQ([2.69])
5+
AC_INIT([ltfs-plugins], [0.1], [manu@netbsd.org])
6+
AC_CONFIG_SRCDIR([src/tape_drivers/netbsd/ltotape/ltotape.c])
7+
AC_CONFIG_MACRO_DIRS([m4])
8+
AC_CONFIG_MACRO_DIR([m4])
9+
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
10+
AC_CONFIG_HEADERS([config.h])
11+
AC_PROG_CC
12+
AM_PROG_AR
13+
AC_PROG_LIBTOOL
14+
15+
16+
# Checks for header files.
17+
AC_CHECK_HEADERS([fcntl.h inttypes.h stdlib.h string.h sys/file.h sys/ioctl.h unistd.h])
18+
19+
# Checks for typedefs, structures, and compiler characteristics.
20+
AC_CHECK_HEADER_STDBOOL
21+
AC_TYPE_SIZE_T
22+
AC_TYPE_UINT16_T
23+
AC_TYPE_UINT32_T
24+
AC_TYPE_UINT64_T
25+
AC_TYPE_UINT8_T
26+
27+
# Checks for library functions.
28+
AC_CHECK_FUNCS([memset strerror strstr])
29+
30+
dnl
31+
dnl Check for pkg-config
32+
dnl
33+
if test -z "$PKG_CONFIG"
34+
then
35+
AC_PATH_PROG(PKG_CONFIG, pkg-config, [no])
36+
fi
37+
if test "x${PKG_CONFIG}" = "xno"
38+
then
39+
AC_MSG_ERROR([pkg-config was not found])
40+
fi
41+
42+
dnl
43+
dnl Check for genrb
44+
dnl
45+
AC_PATH_PROG(GENRB, genrb, no)
46+
if test "x${GENRB}" = "xno"
47+
then
48+
AC_MSG_ERROR([genrb was not found])
49+
fi
50+
51+
dnl
52+
dnl Check for pkgdata
53+
dnl
54+
AC_PATH_PROG(PKGDATA, pkgdata, no)
55+
if test "x${PKGDATA}" = "xno"
56+
then
57+
AC_MSG_ERROR([pkgdata was not found])
58+
fi
59+
60+
dnl
61+
dnl Check for ICU
62+
dnl
63+
ICU_MODULE_CFLAGS="`icu-config --cppflags 2> /dev/null`";
64+
ICU_MODULE_LIBS="`icu-config --ldflags 2> /dev/null`";
65+
if test -z "$ICU_MODULE_LIBS"
66+
then
67+
PKG_CHECK_MODULES([ICU_MODULE], [icu >= 0.21])
68+
fi
69+
70+
AC_MSG_CHECKING([use latest ICU])
71+
AC_ARG_ENABLE([icu_6x],
72+
[AS_HELP_STRING([--enable-icu-6x],[Support handling of ICU 6x functions])],
73+
[icu_6x=$enableval],
74+
[icu_6x=no]
75+
)
76+
AC_MSG_RESULT([$icu_6x])
77+
78+
if test "x${icu_6x}" = "xyes"
79+
then
80+
AC_MSG_CHECKING(for ICU version)
81+
ICU_MODULE_VERSION="`icu-config --version 2> /dev/null`";
82+
if test "${ICU_MODULE_VERSION%%.*}" -ge "60"
83+
then
84+
AM_EXTRA_CPPFLAGS="${AM_EXTRA_CPPFLAGS} -D ICU6x"
85+
fi
86+
AC_MSG_RESULT([$ICU_MODULE_VERSION])
87+
fi
88+
89+
dnl
90+
dnl test for ENOMEDIUM
91+
dnl
92+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <errno.h>],[
93+
#ifndef ENOMEDIUM
94+
#error no ENOMEDIUM
95+
#endif])],[],[AM_CPPFLAGS="${AM_CPPFLAGS} -DENOMEDIUM=EAGAIN"])
96+
97+
98+
AM_CPPFLAGS="${AM_CPPFLAGS} `${PKG_CONFIG} --cflags ltfs`"
99+
AM_CPPFLAGS="${AM_CPPFLAGS} `${PKG_CONFIG} --cflags fuse`"
100+
AM_CPPFLAGS="${AM_CPPFLAGS} -DIBM_LTFS_BUILD -DGENERIC_OEM_BUILD"
101+
AM_CPPFLAGS="${AM_CPPFLAGS} ${ICU_MODULE_CFLAGS}"
102+
#AM_CPPFLAGS="${AM_CPPFLAGS} -DENOMEDIUM=EAGAIN"
103+
104+
AM_CONDITIONAL([CHK_MESSAGE], [test "x${use_msg_check}" = "xyes"])
105+
106+
AC_SUBST(CFLAGS)
107+
AC_SUBST(AM_CPPFLAGS)
108+
AC_SUBST(AM_EXTRA_CPPFLAGS)
109+
AC_SUBST(AM_CFLAGS)
110+
AC_SUBST(AM_LDFLAGS)
111+
112+
AC_CONFIG_FILES([Makefile messages/Makefile src/tape_drivers/netbsd/ltotape/Makefile])
113+
AC_OUTPUT

messages/Makefile.am

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
##
2+
##
3+
## OO_Copyright_BEGIN
4+
##
5+
##
6+
## Copyright 2010, 2018 IBM Corp. All rights reserved.
7+
##
8+
## Redistribution and use in source and binary forms, with or without
9+
## modification, are permitted provided that the following conditions
10+
## are met:
11+
## 1. Redistributions of source code must retain the above copyright
12+
## notice, this list of conditions and the following disclaimer.
13+
## 2. Redistributions in binary form must reproduce the above copyright
14+
## notice, this list of conditions and the following disclaimer in the
15+
## documentation and/or other materials provided with the distribution.
16+
## 3. Neither the name of the copyright holder nor the names of its
17+
## contributors may be used to endorse or promote products derived from
18+
## this software without specific prior written permission.
19+
##
20+
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
21+
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23+
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24+
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25+
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26+
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28+
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
## POSSIBILITY OF SUCH DAMAGE.
31+
##
32+
##
33+
## OO_Copyright_END
34+
##
35+
######################################################################################
36+
##
37+
## COMPONENT NAME: IBM Linear Tape File System
38+
##
39+
## FILE NAME: Makefile.osx
40+
##
41+
## DESCRIPTION: Automake template for LTFS message libraries on Linux.
42+
##
43+
## AUTHOR: Brian Biskeborn
44+
## IBM Almaden Research Center
45+
## bbiskebo@us.ibm.com
46+
##
47+
######################################################################################
48+
49+
RESOURCES = \
50+
driver_ltotape_dat.a
51+
52+
.PHONY: all $(RESOURCES) clean-local
53+
if CHK_MESSAGE
54+
all: $(RESOURCES) ../src/ltfsmsg.h
55+
else
56+
all: $(RESOURCES)
57+
endif
58+
59+
$(RESOURCES):
60+
@./make_message_src.sh $@
61+
62+
if CHK_MESSAGE
63+
../src/ltfsmsg.h: $(RESOURCES)
64+
./print_error_messages.py > ../src/ltfsmsg.h
65+
endif
66+
67+
clean-local:
68+
rm -rf $(RESOURCES) */work
69+
rm -f ../src/ltfsmsg.h

messages/driver_ltotape/en.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//
2+
// %Z% %I% %W% %G% %U%
3+
//
4+
// ZZ_Copyright_BEGIN
5+
//
6+
//
7+
// Licensed Materials - Property of Hewlett Packard Enterprise Development LP
8+
//
9+
// HPE StoreOpen Standalone Version 2.0.1
10+
//
11+
// (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
12+
//
13+
// This file is part of the HPE StoreOpen Standalone
14+
//
15+
// The HPE StoreOpen Standalone is free software;
16+
// you can redistribute it and/or modify it under the terms of the GNU Lesser
17+
// General Public License as published by the Free Software Foundation,
18+
// version 2.1 of the License.
19+
//
20+
// The HPE StoreOpen Standalone is distributed in the
21+
// hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
22+
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23+
// See the GNU Lesser General Public License for more details.
24+
//
25+
// You should have received a copy of the GNU Lesser General Public
26+
// License along with this library; if not, write to the Free Software
27+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28+
// or download the license from <http://www.gnu.org/licenses/>.
29+
//
30+
//
31+
// ZZ_Copyright_END
32+
//
33+
34+
en:table {
35+
// This resource intentionally left blank.
36+
}
37+

messages/driver_ltotape/en_US.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//
2+
// %Z% %I% %W% %G% %U%
3+
//
4+
// ZZ_Copyright_BEGIN
5+
//
6+
//
7+
// Licensed Materials - Property of Hewlett Packard Enterprise Development LP
8+
//
9+
// HPE StoreOpen Standalone Version 2.0.1
10+
//
11+
// (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
12+
//
13+
// This file is part of the HPE StoreOpen Standalone
14+
//
15+
// The HPE StoreOpen Standalone is free software;
16+
// you can redistribute it and/or modify it under the terms of the GNU Lesser
17+
// General Public License as published by the Free Software Foundation,
18+
// version 2.1 of the License.
19+
//
20+
// The HPE StoreOpen Standalone is distributed in the
21+
// hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
22+
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23+
// See the GNU Lesser General Public License for more details.
24+
//
25+
// You should have received a copy of the GNU Lesser General Public
26+
// License along with this library; if not, write to the Free Software
27+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28+
// or download the license from <http://www.gnu.org/licenses/>.
29+
//
30+
//
31+
// ZZ_Copyright_END
32+
//
33+
34+
en_US:table {
35+
// This resource intentionally left blank.
36+
}
37+

0 commit comments

Comments
 (0)