summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorryoon <ryoon>2013-10-15 14:14:53 +0000
committerryoon <ryoon>2013-10-15 14:14:53 +0000
commit8177fd6998ff45761c68dd64b84e9b9b7313aa0c (patch)
treebd5a5a041dd5528d1e63edfc0c2a85dd66d60e82 /emulators
parent75a1201faddf1e8af98bd8a48197e74f71d6953f (diff)
downloadpkgsrc-8177fd6998ff45761c68dd64b84e9b9b7313aa0c.tar.gz
Update to 3.09
* With some aws tape images, I have gotten some errors * We can install Linux/s390x to hercules with tun network support on NetBSD Changelog: unknown
Diffstat (limited to 'emulators')
-rw-r--r--emulators/hercules/Makefile10
-rw-r--r--emulators/hercules/PLIST5
-rw-r--r--emulators/hercules/patches/patch-Makefile.in37
-rw-r--r--emulators/hercules/patches/patch-hstructs.h22
-rw-r--r--emulators/hercules/patches/patch-htypes.h73
-rw-r--r--emulators/hercules/patches/patch-scsitape.c18
-rw-r--r--emulators/hercules/patches/patch-tapecopy.c19
7 files changed, 131 insertions, 53 deletions
diff --git a/emulators/hercules/Makefile b/emulators/hercules/Makefile
index 744c0f3e56c..fb82542843f 100644
--- a/emulators/hercules/Makefile
+++ b/emulators/hercules/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.31 2013/10/12 15:02:05 ryoon Exp $
+# $NetBSD: Makefile,v 1.32 2013/10/15 14:14:53 ryoon Exp $
-DISTNAME= hercules-3.07
-PKGREVISION= 3
+DISTNAME= hercules-3.09
CATEGORIES= emulators
-MASTER_SITES= http://www.hercules-390.org/
+MASTER_SITES= http://downloads.hercules-390.eu/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.hercules-390.eu/
@@ -20,7 +19,7 @@ USE_LIBTOOL= YES
PTHREAD_OPTS+= require
-REPLACE_PERL+= util/cvslvlck
+REPLACE_PERL+= util/bldlvlck
USE_TOOLS+= perl:run
INSTALLATION_DIRS+= bin share/examples/hercules
@@ -30,6 +29,7 @@ INSTALLATION_DIRS+= bin share/examples/hercules
pre-configure:
${RM} ${WRKSRC}/ltdl.h ${WRKSRC}/ltdl.c
cd ${WRKSRC} && autoconf
+
pre-install:
${INSTALL_DATA} ${WRKSRC}/hercules.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/
# ${INSTALL_DATA} ${WRKSRC}/zzsa.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/
diff --git a/emulators/hercules/PLIST b/emulators/hercules/PLIST
index 60e54b8fa6a..8dbac7e5cb5 100644
--- a/emulators/hercules/PLIST
+++ b/emulators/hercules/PLIST
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.3 2011/05/01 23:28:57 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.4 2013/10/15 14:14:53 ryoon Exp $
+bin/bldlvlck
bin/cckd2ckd
bin/cckdcdsk
bin/cckdcomp
@@ -6,7 +7,6 @@ bin/cckddiag
bin/cckdswap
bin/cfba2fba
bin/ckd2cckd
-bin/cvslvlck
bin/dasdcat
bin/dasdconv
bin/dasdcopy
@@ -52,6 +52,7 @@ lib/libherct.la
lib/libhercu.la
man/man1/cckddiag.1
man/man1/dasdseq.1
+man/man1/hercules.1
man/man4/cckd.4
share/examples/hercules/hercules.cnf
share/hercules/TMOUNT.txt
diff --git a/emulators/hercules/patches/patch-Makefile.in b/emulators/hercules/patches/patch-Makefile.in
index 4c0d1104ac5..e1f3e5522cb 100644
--- a/emulators/hercules/patches/patch-Makefile.in
+++ b/emulators/hercules/patches/patch-Makefile.in
@@ -1,35 +1,32 @@
-$NetBSD: patch-Makefile.in,v 1.2 2011/05/06 13:12:48 ryoon Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2013/10/15 14:14:53 ryoon Exp $
* Fix build. Use devel/libltdl instead of internal libltdl.
---- Makefile.in.orig 2010-03-07 12:04:49.000000000 +0000
+--- Makefile.in.orig 2013-07-28 17:12:17.000000000 +0000
+++ Makefile.in
-@@ -304,13 +304,13 @@ libherct_la_OBJECTS = $(am_libherct_la_O
+@@ -294,10 +294,10 @@ libherct_la_LINK = $(LIBTOOL) --tag=CC $
libhercu_la_DEPENDENCIES = $(am__DEPENDENCIES_1) libhercs.la
am__libhercu_la_SOURCES_DIST = version.c hscutl.c hscutl2.c codepage.c \
logger.c logmsg.c hdl.c hostinfo.c hsocket.c memrchr.c \
-- parser.c pttrace.c fthreads.c fishhang.c ltdl.c
-+ parser.c pttrace.c fthreads.c fishhang.c
+- parser.c pttrace.c fthreads.c ltdl.c
++ parser.c pttrace.c fthreads.c
am__objects_5 = fthreads.lo
- @BUILD_FTHREADS_TRUE@am__objects_8 = $(am__objects_5)
- am__objects_6 = fishhang.lo
- @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_9 = \
- @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@ $(am__objects_6)
--@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 = ltdl.lo
-+@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =
+ @BUILD_FTHREADS_TRUE@am__objects_6 = $(am__objects_5)
+-@OPTION_DYNAMIC_LOAD_TRUE@am__objects_7 = ltdl.lo
++@OPTION_DYNAMIC_LOAD_TRUE@am__objects_7 =
am_libhercu_la_OBJECTS = version.lo hscutl.lo hscutl2.lo codepage.lo \
logger.lo logmsg.lo hdl.lo hostinfo.lo hsocket.lo memrchr.lo \
- parser.lo pttrace.lo $(am__objects_8) $(am__objects_9) \
-@@ -614,7 +614,7 @@ AUTOMAKE_OPTIONS = foreign 1.5
- ACLOCAL_AMFLAGS = -I m4
+ parser.lo pttrace.lo $(am__objects_6) $(am__objects_7)
+@@ -675,7 +675,7 @@ AUTOMAKE_OPTIONS = foreign 1.5
+ ACLOCAL_AMFLAGS = -I m4 -I autoconf
lns = @LN_S@
- SUBDIRS = decNumber m4 po util html man . crypto
--LDADD = @LTLIBICONV@ @LTLIBINTL@ @LIBS@
-+LDADD = @LTLIBICONV@ @LTLIBINTL@ @LIBS@ -lltdl
+ SUBDIRS = decNumber m4 util html man . crypto
+-LDADD = @LIBS@
++LDADD = @LIBS@ -lltdl
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/decNumber
@BUILD_HERCIFC_FALSE@HERCIFC =
@BUILD_HERCIFC_TRUE@HERCIFC = hercifc
-@@ -683,11 +683,11 @@ dyndev_SRC = commadpt.c \
+@@ -740,11 +740,11 @@ dyndev_SRC = commadpt.c \
# -avoid-version : needed.. Otherwise libtool gives crazy names to Windows
# DLLs
#
@@ -43,7 +40,7 @@ $NetBSD: patch-Makefile.in,v 1.2 2011/05/06 13:12:48 ryoon Exp $
@OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS =
@OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS = -module \
@OPTION_DYNAMIC_LOAD_TRUE@ -no-undefined \
-@@ -914,7 +914,6 @@ EXTRA_libherc_la_SOURCES = $(fthreads_SR
+@@ -969,7 +969,6 @@ EXTRA_libherc_la_SOURCES = $(fthreads_SR
$(dynamic_SRC) \
$(extra_SRC) \
$(dyndev_SRC) \
@@ -51,7 +48,7 @@ $NetBSD: patch-Makefile.in,v 1.2 2011/05/06 13:12:48 ryoon Exp $
libherc_la_LDFLAGS = $(LIB_LD_FLAGS)
libherc_la_LIBADD = libhercs.la \
-@@ -1166,7 +1165,6 @@ noinst_HEADERS = fishhang.h \
+@@ -1211,7 +1210,6 @@ noinst_HEADERS = hostinfo.h \
hdl.h \
crypto.h \
sockdev.h \
diff --git a/emulators/hercules/patches/patch-hstructs.h b/emulators/hercules/patches/patch-hstructs.h
index be7f728aa8a..902459e0112 100644
--- a/emulators/hercules/patches/patch-hstructs.h
+++ b/emulators/hercules/patches/patch-hstructs.h
@@ -1,9 +1,9 @@
-$NetBSD: patch-hstructs.h,v 1.1 2011/05/01 23:28:59 ryoon Exp $
+$NetBSD: patch-hstructs.h,v 1.2 2013/10/15 14:14:53 ryoon Exp $
---- hstructs.h.orig 2010-02-12 23:58:38.000000000 +0000
+--- hstructs.h.orig 2013-06-14 21:32:42.000000000 +0000
+++ hstructs.h
-@@ -1025,9 +1025,13 @@ struct DEVBLK {
- U32 msgid; /* Message Id of async. i/o */
+@@ -1105,9 +1105,13 @@ struct DEVBLK {
+ u_int write_immed:1; /* 1=Write-Immediate mode */
#if defined(OPTION_SCSI_TAPE)
struct mtget mtget; /* SCSI tape status struct */
+#if (defined(BSD) && BSD >= 199306)
@@ -13,18 +13,6 @@ $NetBSD: patch-hstructs.h,v 1.1 2011/05/01 23:28:59 ryoon Exp $
independent status field;
(struct mtget->mt_gstat) */
+#endif
- TID stape_mountmon_tid; /* Tape-mount monitor thread */
u_int stape_close_rewinds:1; /* 1=Rewind at close */
u_int stape_blkid_32:1; /* 1=block-ids are 32 bits */
-@@ -1039,7 +1043,11 @@ struct DEVBLK {
- COND stape_getstat_cond; /* COND for status wrkr thrd */
- COND stape_exit_cond; /* thread wait for exit COND */
- struct mtget stape_getstat_mtget;/* status wrkr thrd status */
-+#if (defined(BSD) && BSD >= 199306)
-+#define stape_getstat_sstat stape_getstat_mtget.mt_erreg
-+#else
- #define stape_getstat_sstat stape_getstat_mtget.mt_gstat /* (gstat) */
-+#endif
- struct timeval
- stape_getstat_query_tod;/* TOD of actual drive query */
- #endif
+ u_int stape_no_erg:1; /* 1=ignore Erase Gap CCWs */
diff --git a/emulators/hercules/patches/patch-htypes.h b/emulators/hercules/patches/patch-htypes.h
new file mode 100644
index 00000000000..a8901cb3f60
--- /dev/null
+++ b/emulators/hercules/patches/patch-htypes.h
@@ -0,0 +1,73 @@
+$NetBSD: patch-htypes.h,v 1.1 2013/10/15 14:14:53 ryoon Exp $
+
+--- htypes.h.orig 2013-06-14 21:32:42.000000000 +0000
++++ htypes.h
+@@ -149,13 +149,16 @@ typedef uint8_t QWORD[16]; // unsig
+ typedef char *const *EXECV_ARG2_ARGV_T;
+ #endif
+
+-#if defined( OPTION_SCSI_TAPE ) && !defined( HAVE_SYS_MTIO_H )
++#if defined( OPTION_SCSI_TAPE ) && (!defined( HAVE_SYS_MTIO_H ) || defined(__NetBSD__))
+ struct mt_tape_info
+ {
+- long t_type; /* device type id (mt_type) */
+- char *t_name; /* descriptive name */
++ BYTE t_type; /* device type id (mt_type) */
++ const char *t_name; /* descriptive name */
+ };
+- #define MT_TAPE_INFO { { 0, NULL } }
++#define MT_ISUNKNOWN 0x01
++#define MT_ISQIC02 0x02
++
++#define MT_TAPE_INFO { {MT_ISUNKNOWN, "Unknown type of tape device"}, {MT_ISQIC02, "Generic QIC-02 tape streamer"}, {0, NULL} }
+ #endif
+
+ /*-------------------------------------------------------------------*/
+@@ -230,4 +233,47 @@ typedef int DEVSR (DEVBLK *dev, void
+
+ typedef BYTE *DEVIM; /* Immediate CCW Codes Table */
+
++#if defined(BSD) && BSD >= 199306
++/*-------------------------------------------------------------------*/
++/* Support for BSD tape */
++/*-------------------------------------------------------------------*/
++/* Generic Mag Tape (device independent) status macros for examining
++ * mt_gstat -- HP-UX compatible.
++ * There is room for more generic status bits here, but I don't
++ * know which of them are reserved. At least three or so should
++ * be added to make this really useful.
++ */
++#define GMT_EOF(x) ((x) & 0x80000000)
++#define GMT_BOT(x) ((x) & 0x40000000)
++#define GMT_EOT(x) ((x) & 0x20000000)
++#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
++#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
++#define GMT_WR_PROT(x) ((x) & 0x04000000)
++/* #define GMT_ ? ((x) & 0x02000000) */
++#define GMT_ONLINE(x) ((x) & 0x01000000)
++#define GMT_D_6250(x) ((x) & 0x00800000)
++#define GMT_D_1600(x) ((x) & 0x00400000)
++#define GMT_D_800(x) ((x) & 0x00200000)
++/* #define GMT_ ? ((x) & 0x00100000) */
++/* #define GMT_ ? ((x) & 0x00080000) */
++#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
++/* #define GMT_ ? ((x) & 0x00020000) */
++#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
++/* 16 generic status bits unused */
++/* SCSI-tape specific definitions */
++
++/* Bitfield shifts in the status */
++#define MT_ST_BLKSIZE_SHIFT 0
++#define MT_ST_BLKSIZE_MASK 0xffffff
++#define MT_ST_DENSITY_SHIFT 24
++#define MT_ST_DENSITY_MASK 0xff000000
++
++#define MTSETBLK 20 /* set block length (SCSI) */
++
++#define MTIOCPOS MTNOP /* do nothing, status only */
++//#define mtpos mtget /* generic status struct, including mt_blkno */
++#define MTSEEK MTFSR /* forward seek record; probably wrong */
++
++#endif /* BSD */
++
+ #endif // _HTYPES_H_
diff --git a/emulators/hercules/patches/patch-scsitape.c b/emulators/hercules/patches/patch-scsitape.c
index d8749527249..35345bf99e8 100644
--- a/emulators/hercules/patches/patch-scsitape.c
+++ b/emulators/hercules/patches/patch-scsitape.c
@@ -1,8 +1,20 @@
-$NetBSD: patch-scsitape.c,v 1.1 2011/05/01 23:28:59 ryoon Exp $
+$NetBSD: patch-scsitape.c,v 1.2 2013/10/15 14:14:53 ryoon Exp $
---- scsitape.c.orig 2010-01-08 22:56:27.000000000 +0000
+--- scsitape.c.orig 2013-06-14 21:32:42.000000000 +0000
+++ scsitape.c
-@@ -1334,6 +1334,19 @@ int locateblk_scsitape ( DEVBLK* dev, U3
+@@ -1261,7 +1261,11 @@ int readblkid_scsitape ( DEVBLK* dev, BY
+ // value, also known as the >>LOGICAL<< value and *NOT*
+ // the absolute/physical device-relative value)
+
++#if defined(BSD) && BSD >= 199306
++ struct mtget mtpos;
++#else
+ struct mtpos mtpos;
++#endif
+ BYTE blockid[4];
+
+ if (ioctl_tape( dev->fd, MTIOCPOS, (char*) &mtpos ) < 0 )
+@@ -1326,6 +1330,19 @@ int locateblk_scsitape ( DEVBLK* dev, U3
mtop.mt_count = CSWAP32( mtop.mt_count ); // (host <- guest)
mtop.mt_op = MTSEEK;
diff --git a/emulators/hercules/patches/patch-tapecopy.c b/emulators/hercules/patches/patch-tapecopy.c
index bdb93456c86..283c64da8e2 100644
--- a/emulators/hercules/patches/patch-tapecopy.c
+++ b/emulators/hercules/patches/patch-tapecopy.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-tapecopy.c,v 1.2 2013/10/14 13:41:18 ryoon Exp $
+$NetBSD: patch-tapecopy.c,v 1.3 2013/10/15 14:14:53 ryoon Exp $
---- tapecopy.c.orig 2010-01-08 22:56:27.000000000 +0000
+--- tapecopy.c.orig 2013-06-14 21:32:42.000000000 +0000
+++ tapecopy.c
-@@ -242,15 +242,21 @@ static void print_usage (void)
+@@ -245,15 +245,21 @@ static void print_usage (void)
static int obtain_status (char *devname, int devfd, struct mtget* mtget)
{
int rc; /* Return code */
@@ -26,7 +26,7 @@ $NetBSD: patch-tapecopy.c,v 1.2 2013/10/14 13:41:18 ryoon Exp $
)
)
return +1;
-@@ -260,8 +266,8 @@ int rc;
+@@ -263,8 +269,8 @@ int rc;
return -1;
}
@@ -37,15 +37,22 @@ $NetBSD: patch-tapecopy.c,v 1.2 2013/10/14 13:41:18 ryoon Exp $
return +1;
return 0;
-@@ -499,6 +505,7 @@ struct mtget mtget;
+@@ -499,9 +505,14 @@ int64_t file_bytes;
+ char pathname[MAX_PATH]; /* file name in host format */
+ struct mtget mtget; /* Area for MTIOCGET ioctl */
+ #if defined(EXTERNALGUI)
++#if defined(BSD) && BSD >= 199306
++struct mtget mtpos; /* Area for MTIOCPOS ioctl */
++#else
struct mtpos mtpos; /* Area for MTIOCPOS ioctl */
++#endif
int is3590 = 0; /* 1 == 3590, 0 == 3480/3490 */
#endif /*defined(EXTERNALGUI)*/
+long gstat;
INITIALIZE_UTILITY("tapecopy");
-@@ -636,8 +643,13 @@ int is3590 = 0;
+@@ -639,8 +650,13 @@ int is3590 = 0;
printf (_("HHCTC004I %s tape density code: 0x%lX\n"),
(devnamein ? devnamein : devnameout), density);