- move star to "archivers" where gtar is; ok espie@

- switch patch files to modern naming, add RCS ID to PLIST
This commit is contained in:
naddy 2000-10-01 21:15:48 +00:00
parent 99c8086fe2
commit a792569592
10 changed files with 399 additions and 0 deletions

34
archivers/star/Makefile Normal file
View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2000/10/01 21:15:48 naddy Exp $
# $FreeBSD: Makefile,v 1.7 1998/12/24 13:15:23 dirk Exp $
DISTNAME= star-1.2
CATEGORIES= archivers sysutils
MASTER_SITES= ftp://ftp.fokus.gmd.de/pub/unix/star/ \
${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= utils/compress
MAINTAINER= Christian Weisgerber <naddy@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
USE_GMAKE= Yes
MAKE_ENV= MAKEPROG="${GMAKE}" CCOM="${CC}"
.if ${MACHINE} != "i386" || ${CC} != "cc"
do-configure:
@rm -f ${WRKSRC}/RULES/${MACHINE}-openbsd-${CC}.rul
@cp ${WRKSRC}/RULES/i386-openbsd-cc.rul \
${WRKSRC}/RULES/${MACHINE}-openbsd-${CC}.rul
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/star/OBJ/${MACHINE}-openbsd-${CC}/star \
${PREFIX}/bin
cd ${PREFIX}/bin; ln -sf star ustar
${INSTALL_MAN} ${WRKSRC}/star/star.1 ${PREFIX}/man/man1
cd ${PREFIX}/man/man1; ln -sf star.1 ustar.1
.include <bsd.port.mk>

3
archivers/star/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (star-1.2.tar.gz) = a49261837f2aa99355db3fae57d617ac
RMD160 (star-1.2.tar.gz) = 1d8017a08899978cdfd7a49753c6bbdf53e91f73
SHA1 (star-1.2.tar.gz) = 2a5ca180b072d0e6b8bd98473f7dc6c448fa41c6

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-RULES_i386-openbsd-cc_rul,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
--- RULES/i386-openbsd-cc.rul.orig Tue Jul 8 17:37:45 1997
+++ RULES/i386-openbsd-cc.rul Sun Oct 1 23:09:57 2000
@@ -24,7 +24,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg
###########################################################################
CPPFLAGS= $(CPPOPTS) $(CPPOPTX)
-CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(COPTX)
+CFLAGS+= $(COPTS) $(CWARNOPTS) $(COPTX)
CPPOPTS= -I. -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(OSDEFS)
COPTS=
@@ -47,7 +47,7 @@ LIB_KVM=
LIBS_PATH= -L$(OLIBSDIR)
-LDFLAGS= $(LDOPTS) $(LDOPTX)
+LDFLAGS+= $(LDOPTS) $(LDOPTX)
LDLIBS= $(LIBS) $(LIBX)
#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH)
@@ -57,14 +57,14 @@ LNDYNLIB= @$(SYMLINK) $(TARGET) $(PTARGE
FLOAT_OPTIONS=
-CC= @echo " ==> COMPILING \"$@\""; gcc
-LDCC= @echo " ==> LINKING \"$@\""; gcc
-DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc
+CC= @echo " ==> COMPILING \"$@\""; ${CCOM}
+LDCC= @echo " ==> LINKING \"$@\""; ${CCOM}
+DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ${CCOM}
RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib
ARFLAGS= cr
LORDER= lorder
TSORT= tsort
RMDEP= :
-MKDEP= @echo " ==> MAKE DEPENDENCIES \"$@\""; $(RMDEP); gcc -M
+MKDEP= @echo " ==> MAKE DEPENDENCIES \"$@\""; $(RMDEP); ${CCOM} -M
MKDEP_OUT=

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-RULES_rules_top,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
--- RULES/rules.top.orig Sun Apr 27 01:47:38 1997
+++ RULES/rules.top Sun Oct 1 23:09:58 2000
@@ -151,7 +151,7 @@ __PARCH= $(_PARCH:$(_UNIQ)=$(PARCH_DEF))
PARCH= $(__PARCH:$(_UNIQ)%=%)
#OARCH= $(MARCH)$(-O_ARCH)-$(C_ARCH)
-OARCH= $(PARCH)$(-O_ARCH)-$(C_ARCH)
+OARCH= $(K_ARCH)$(-O_ARCH)-$(C_ARCH)
XARCH= $(K_ARCH)$(-O_ARCH)-$(C_ARCH)
.print:
echo $(XP_ARCH) $(P_ARCH)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-include_standard_h,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
--- include/standard.h.orig Sun Jan 26 12:49:31 1997
+++ include/standard.h Sun Oct 1 23:09:58 2000
@@ -182,7 +182,7 @@ extern void setfp __PR((void * const *))
extern int wait_chld __PR((int));
extern int geterrno __PR((void));
extern void raisecond __PR((const char *, long));
-extern int snprintf __PR((char *, unsigned, const char *, ...));
+/*extern int snprintf __PR((char *, unsigned, const char *, ...));*/
/*extern int sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/
extern char *strcatl __PR((char *, ...));
extern int streql __PR((const char *, const char *));

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-star_star_1,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
--- star/star.1.orig Tue Jun 23 02:41:37 1998
+++ star/star.1 Sun Oct 1 23:09:59 2000
@@ -15,10 +15,18 @@
.if n .ds s sz
.TH STAR 1 "Release 1.1" "J\*org Schilling" "Schily\'s USER COMMANDS"
.SH NAME
-star \- unique standard tape archiver
+star, ustar \- unique standard tape archiver
.SH SYNOPSIS
.B
star
+.I command
+[
+.I options
+]
+.I file1 .\|.\|. filen
+.br
+.B
+ustar
.I command
[
.I options

View File

@ -0,0 +1,249 @@
$OpenBSD: patch-star_star_c,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
--- star/star.c.orig Sun Nov 9 15:26:20 1997
+++ star/star.c Sun Oct 1 23:09:58 2000
@@ -403,44 +403,46 @@ LOCAL void
usage(ret)
int ret;
{
- error("Usage:\tstar cmd [options] file1 ... filen\n");
- error("Cmd:\n");
- error("\t-c/-u/-r\tcreate/update/replace named files to tape\n");
- error("\t-x/-t/-n\textract/list/trace named files from tape\n");
- error("\t-diff\t\tdiff archive against file system (see -xhelp)\n");
- error("Options:\n");
- error("\t-help,-h\tprint this help\n");
- error("\t-xhelp\t\tprint extended help\n");
- error("\tblocks=#,b=#\tset blocking factor to #x512 Bytes (default 20)\n");
- error("\tfile=nm,f=nm\tuse 'nm' as tape instead of stdin/stdout\n");
- error("\t-T\t\tuse $TAPE as tape instead of stdin/stdout\n");
+ FILE *fp = ret ? stderr : stdout;
+
+ fprintf(fp, "Usage:\tstar cmd [options] file1 ... filen\n");
+ fprintf(fp, "Cmd:\n");
+ fprintf(fp, "\t-c/-u/-r\tcreate/update/replace named files to tape\n");
+ fprintf(fp, "\t-x/-t/-n\textract/list/trace named files from tape\n");
+ fprintf(fp, "\t-diff\t\tdiff archive against file system (see -xhelp)\n");
+ fprintf(fp, "Options:\n");
+ fprintf(fp, "\t-help,-h\tprint this help\n");
+ fprintf(fp, "\t-xhelp\t\tprint extended help\n");
+ fprintf(fp, "\tblocks=#,b=#\tset blocking factor to #x512 Bytes (default 20)\n");
+ fprintf(fp, "\tfile=nm,f=nm\tuse 'nm' as tape instead of stdin/stdout\n");
+ fprintf(fp, "\t-T\t\tuse $TAPE as tape instead of stdin/stdout\n");
#ifdef FIFO
- error("\t-fifo/-no_fifo\tuse/don't use a fifo to optimize data flow from/to tape\n");
+ fprintf(fp, "\t-fifo/-no_fifo\tuse/don't use a fifo to optimize data flow from/to tape\n");
#if defined(USE_MMAP) && defined(USE_SHM)
- error("\t-shm\t\tuse SysV shared memory for fifo\n");
+ fprintf(fp, "\t-shm\t\tuse SysV shared memory for fifo\n");
#endif
#endif
- error("\t-v\t\tbe verbose\n");
- error("\t-tpath\t\tuse with -t to list path names only\n");
- error("\tH=header\tgenerate 'header' type archive (see H=help)\n");
- error("\tC=dir\t\tperform a chdir to 'dir' before storing next file\n");
- error("\t-z\t\tpipe input/output through gzip, does not work on tapes\n");
- error("\t-B\t\tperform multiple reads (needed on pipes)\n");
- error("\t-i\t\tignore checksum errors\n");
- error("\t-d\t\tdo not store/create directories\n");
- error("\t-m\t\tdo not restore access and modification time\n");
- error("\t-nochown\tdo not restore owner and group\n");
- error("\t-a,-atime\treset access time after storing file\n");
- error("\t-p\t\trestore filemodes of directories\n");
- error("\t-l\t\tdo not print a message if not all links are dumped\n");
- error("\t-L\t\tfollow symbolic links as if they were files\n");
- error("\t-D\t\tdo not descend directories\n");
- error("\t-M\t\tdo not descend mounting points\n");
- error("\t-I\t\tdo interactive creation/extraction/renaming\n");
- error("\t-O\t\tbe compatible to old tar (except for checksum bug)\n");
- error("\t-P\t\tlast record may be partial (useful on cartridge tapes)\n");
- error("\t-S\t\tdo not store/create special files\n");
- error("\t-U\t\trestore files unconditionally\n");
+ fprintf(fp, "\t-v\t\tbe verbose\n");
+ fprintf(fp, "\t-tpath\t\tuse with -t to list path names only\n");
+ fprintf(fp, "\tH=header\tgenerate 'header' type archive (see H=help)\n");
+ fprintf(fp, "\tC=dir\t\tperform a chdir to 'dir' before storing next file\n");
+ fprintf(fp, "\t-z\t\tpipe input/output through gzip, does not work on tapes\n");
+ fprintf(fp, "\t-B\t\tperform multiple reads (needed on pipes)\n");
+ fprintf(fp, "\t-i\t\tignore checksum errors\n");
+ fprintf(fp, "\t-d\t\tdo not store/create directories\n");
+ fprintf(fp, "\t-m\t\tdo not restore access and modification time\n");
+ fprintf(fp, "\t-nochown\tdo not restore owner and group\n");
+ fprintf(fp, "\t-a,-atime\treset access time after storing file\n");
+ fprintf(fp, "\t-p\t\trestore filemodes of directories\n");
+ fprintf(fp, "\t-l\t\tdo not print a message if not all links are dumped\n");
+ fprintf(fp, "\t-L\t\tfollow symbolic links as if they were files\n");
+ fprintf(fp, "\t-D\t\tdo not descend directories\n");
+ fprintf(fp, "\t-M\t\tdo not descend mounting points\n");
+ fprintf(fp, "\t-I\t\tdo interactive creation/extraction/renaming\n");
+ fprintf(fp, "\t-O\t\tbe compatible to old tar (except for checksum bug)\n");
+ fprintf(fp, "\t-P\t\tlast record may be partial (useful on cartridge tapes)\n");
+ fprintf(fp, "\t-S\t\tdo not store/create special files\n");
+ fprintf(fp, "\t-U\t\trestore files unconditionally\n");
exit(ret);
/* NOTREACHED */
}
@@ -449,52 +451,54 @@ LOCAL void
xusage(ret)
int ret;
{
- error("Usage:\tstar cmd [options] file1 ... filen\n");
- error("Extended options:\n");
- error("\tdiffopts=optlst\tcomma separated list of diffopts (see diffopts=help)\n");
- error("\t-not,-V\t\tuse those files which do not match pattern\n");
- error("\tVOLHDR=name\tuse name to generate a volume header\n");
- error("\t-xdir\t\textract dir even if the current is never\n");
- error("\t-keep_old_files,-k\tkeep existing files\n");
- error("\t-/\t\tdon't strip leading '/'s from file names\n");
- error("\tlist=name\tread filenames from named file\n");
- error("\t-dodesc\t\tdo descend directories found in a list= file\n");
- error("\tpattern=p,pat=p\tset matching pattern\n");
- error("\tmaxsize=#\tdo not store file if it is bigger than # kBytes\n");
- error("\tnewer=name\tstore only files which are newer than 'name'\n");
- error("\t-ctime\t\tuse ctime for newer= option\n");
- error("\tbs=#\t\tset (output) block size to #\n");
+ FILE *fp = ret ? stderr : stdout;
+
+ fprintf(fp, "Usage:\tstar cmd [options] file1 ... filen\n");
+ fprintf(fp, "Extended options:\n");
+ fprintf(fp, "\tdiffopts=optlst\tcomma separated list of diffopts (see diffopts=help)\n");
+ fprintf(fp, "\t-not,-V\t\tuse those files which do not match pattern\n");
+ fprintf(fp, "\tVOLHDR=name\tuse name to generate a volume header\n");
+ fprintf(fp, "\t-xdir\t\textract dir even if the current is never\n");
+ fprintf(fp, "\t-keep_old_files,-k\tkeep existing files\n");
+ fprintf(fp, "\t-/\t\tdon't strip leading '/'s from file names\n");
+ fprintf(fp, "\tlist=name\tread filenames from named file\n");
+ fprintf(fp, "\t-dodesc\t\tdo descend directories found in a list= file\n");
+ fprintf(fp, "\tpattern=p,pat=p\tset matching pattern\n");
+ fprintf(fp, "\tmaxsize=#\tdo not store file if it is bigger than # kBytes\n");
+ fprintf(fp, "\tnewer=name\tstore only files which are newer than 'name'\n");
+ fprintf(fp, "\t-ctime\t\tuse ctime for newer= option\n");
+ fprintf(fp, "\tbs=#\t\tset (output) block size to #\n");
#ifdef FIFO
- error("\tfs=#\t\tset fifo size to #\n");
+ fprintf(fp, "\tfs=#\t\tset fifo size to #\n");
#endif
- error("\ttsize=#\t\tset tape volume size to # 512 byte blocks\n");
- error("\t-qic24\t\tset tape volume size to %d kBytes\n",
+ fprintf(fp, "\ttsize=#\t\tset tape volume size to # 512 byte blocks\n");
+ fprintf(fp, "\t-qic24\t\tset tape volume size to %d kBytes\n",
TSIZE(QIC_24_TSIZE)/1024);
- error("\t-qic120\t\tset tape volume size to %d kBytes\n",
+ fprintf(fp, "\t-qic120\t\tset tape volume size to %d kBytes\n",
TSIZE(QIC_120_TSIZE)/1024);
- error("\t-qic150\t\tset tape volume size to %d kBytes\n",
+ fprintf(fp, "\t-qic150\t\tset tape volume size to %d kBytes\n",
TSIZE(QIC_150_TSIZE)/1024);
- error("\t-qic250\t\tset tape volume size to %d kBytes\n",
+ fprintf(fp, "\t-qic250\t\tset tape volume size to %d kBytes\n",
TSIZE(QIC_250_TSIZE)/1024);
- error("\t-nowarn\t\tdo not print warning messages\n");
- error("\t-time\t\tprint timing info\n");
- error("\t-no_statistics\tdo not print statistics\n");
+ fprintf(fp, "\t-nowarn\t\tdo not print warning messages\n");
+ fprintf(fp, "\t-time\t\tprint timing info\n");
+ fprintf(fp, "\t-no_statistics\tdo not print statistics\n");
#ifdef FIFO
- error("\t-fifostats\tprint fifo statistics\n");
+ fprintf(fp, "\t-fifostats\tprint fifo statistics\n");
#endif
- error("\t-numeric\tdon't use user/group name from tape\n");
- error("\t-newest\t\tfind newest file on tape\n");
- error("\t-newest_file\tfind newest regular file on tape\n");
- error("\t-signed_checksum\tuse signed chars to calculate checksum\n");
- error("\t-sparse\t\thandle file with holes effectively on store/create\n");
- error("\t-force_hole\ttry to extract all files with holes\n");
- error("\t-to_stdout\textract files to stdout\n");
- error("\t-wready\t\twait for tape drive to become ready\n");
- error("\t-force_remove\tforce to remove non writable files on extraction\n");
- error("\t-ask_remove\task to remove non writable files on extraction\n");
- error("\t-remove_first\tremove files before extraction\n");
- error("\t-remove_recursive\tremove files recursive\n");
- error("\t-nullout\tsimulate creating an achive to compute the size\n");
+ fprintf(fp, "\t-numeric\tdon't use user/group name from tape\n");
+ fprintf(fp, "\t-newest\t\tfind newest file on tape\n");
+ fprintf(fp, "\t-newest_file\tfind newest regular file on tape\n");
+ fprintf(fp, "\t-signed_checksum\tuse signed chars to calculate checksum\n");
+ fprintf(fp, "\t-sparse\t\thandle file with holes effectively on store/create\n");
+ fprintf(fp, "\t-force_hole\ttry to extract all files with holes\n");
+ fprintf(fp, "\t-to_stdout\textract files to stdout\n");
+ fprintf(fp, "\t-wready\t\twait for tape drive to become ready\n");
+ fprintf(fp, "\t-force_remove\tforce to remove non writable files on extraction\n");
+ fprintf(fp, "\t-ask_remove\task to remove non writable files on extraction\n");
+ fprintf(fp, "\t-remove_first\tremove files before extraction\n");
+ fprintf(fp, "\t-remove_recursive\tremove files recursive\n");
+ fprintf(fp, "\t-nullout\tsimulate creating an achive to compute the size\n");
exit(ret);
/* NOTREACHED */
}
@@ -503,27 +507,29 @@ LOCAL void
dusage(ret)
int ret;
{
- error("Diff options:\n");
- error("\tnot\t\tif this option is present, exclude listed options\n");
- error("\tperm\t\tcompare file permissions\n");
- error("\tmode\t\tcompare file permissions\n");
- error("\ttype\t\tcompare file type\n");
- error("\tnlink\t\tcompare linkcount (not supported)\n");
- error("\tuid\t\tcompare owner of file\n");
- error("\tgid\t\tcompare group of file\n");
- error("\tuname\t\tcompare name of owner of file\n");
- error("\tgname\t\tcompare name of group of file\n");
- error("\tid\t\tcompare owner, group, ownername and groupname of file\n");
- error("\tsize\t\tcompare file size\n");
- error("\tdata\t\tcompare content of file\n");
- error("\tcont\t\tcompare content of file\n");
- error("\trdev\t\tcompare rdev of device node\n");
- error("\thardlink\tcompare target of hardlink\n");
- error("\tsymlink\t\tcompare target of symlink\n");
- error("\tatime\t\tcompare access time of file (only star)\n");
- error("\tmtime\t\tcompare modification time of file\n");
- error("\tctime\t\tcompare creation time of file (only star)\n");
- error("\ttimes\t\tcompare all times of file\n");
+ FILE *fp = ret ? stderr : stdout;
+
+ fprintf(fp, "Diff options:\n");
+ fprintf(fp, "\tnot\t\tif this option is present, exclude listed options\n");
+ fprintf(fp, "\tperm\t\tcompare file permissions\n");
+ fprintf(fp, "\tmode\t\tcompare file permissions\n");
+ fprintf(fp, "\ttype\t\tcompare file type\n");
+ fprintf(fp, "\tnlink\t\tcompare linkcount (not supported)\n");
+ fprintf(fp, "\tuid\t\tcompare owner of file\n");
+ fprintf(fp, "\tgid\t\tcompare group of file\n");
+ fprintf(fp, "\tuname\t\tcompare name of owner of file\n");
+ fprintf(fp, "\tgname\t\tcompare name of group of file\n");
+ fprintf(fp, "\tid\t\tcompare owner, group, ownername and groupname of file\n");
+ fprintf(fp, "\tsize\t\tcompare file size\n");
+ fprintf(fp, "\tdata\t\tcompare content of file\n");
+ fprintf(fp, "\tcont\t\tcompare content of file\n");
+ fprintf(fp, "\trdev\t\tcompare rdev of device node\n");
+ fprintf(fp, "\thardlink\tcompare target of hardlink\n");
+ fprintf(fp, "\tsymlink\t\tcompare target of symlink\n");
+ fprintf(fp, "\tatime\t\tcompare access time of file (only star)\n");
+ fprintf(fp, "\tmtime\t\tcompare modification time of file\n");
+ fprintf(fp, "\tctime\t\tcompare creation time of file (only star)\n");
+ fprintf(fp, "\ttimes\t\tcompare all times of file\n");
exit(ret);
/* NOTREACHED */
}
@@ -532,12 +538,14 @@ LOCAL void
husage(ret)
int ret;
{
- error("Header types:\n");
- error("\ttar\t\told tar format\n");
- error("\tstar\t\tstar format\n");
- error("\tgnutar\t\tgnu tar format\n");
- error("\tustar\t\tstandard tar (ieee 1003.1) format\n");
- error("\txstar\t\textended standard tar format\n");
+ FILE *fp = ret ? stderr : stdout;
+
+ fprintf(fp, "Header types:\n");
+ fprintf(fp, "\ttar\t\told tar format\n");
+ fprintf(fp, "\tstar\t\tstar format\n");
+ fprintf(fp, "\tgnutar\t\tgnu tar format\n");
+ fprintf(fp, "\tustar\t\tstandard tar (ieee 1003.1) format\n");
+ fprintf(fp, "\txstar\t\textended standard tar format\n");
exit(ret);
/* NOTREACHED */
}

View File

@ -0,0 +1 @@
unique standard tape archiver with many enhancements

20
archivers/star/pkg/DESCR Normal file
View File

@ -0,0 +1,20 @@
star is the fastest known implementation of a tar archiver. star
development started 1982, development is still in progress. The
current version is stable.
Main advantages over other tar implementations:
fifo - Keeps the tape streaming.
pattern matcher - For a convenient user interface.
sophisticated diff - User-tailorable interface for comparing tar
archives against file trees.
no namelen limitation - Pathnames up to 1024 Bytes may be archived.
deals with all three times - Stores/restores all three times of a file.
does not clobber files - More recent copies on disk will not be
clobbered from tape.
automatic byte swap - star automatically detects swapped archives.
automatic format detect - Automatically detects archive formats:
old tar, GNU tar, ANSI tar, star.
fully ansi compatible - star is fully ANSI/POSIX 1003.1 compatible.
Author: Joerg Schilling <schilling@fokus.gmd.de>
Please mail bugs and suggestions to him.

5
archivers/star/pkg/PLIST Normal file
View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/10/01 21:15:49 naddy Exp $
bin/star
bin/ustar
man/man1/star.1
man/man1/ustar.1