Initial import of cksfv-1.1, a tool to check and create simple file
verification (SFV) listings. Package provided by Dieter Baron in private communication.
This commit is contained in:
parent
d469d0d2b1
commit
3b301bdfcc
10 changed files with 151 additions and 0 deletions
16
misc/cksfv/Makefile
Normal file
16
misc/cksfv/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
#
|
||||
|
||||
DISTNAME= cksfv-1.1
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= http://www.fodder.org/cksfv/
|
||||
|
||||
MAINTAINER= dillo@giga.or.at
|
||||
HOMEPAGE= http://www.fodder.org/cksfv/
|
||||
|
||||
do-install:
|
||||
@ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cksfv
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/cksfv
|
||||
@ ${INSTALL_PROGRAM} ${WRKSRC}/src/cksfv ${PREFIX}/bin
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
3
misc/cksfv/files/md5
Normal file
3
misc/cksfv/files/md5
Normal file
|
@ -0,0 +1,3 @@
|
|||
$NetBSD: md5,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
|
||||
MD5 (cksfv-1.1.tar.gz) = e32e3fc05b99ce8ff06af57df3f16952
|
6
misc/cksfv/files/patch-sum
Normal file
6
misc/cksfv/files/patch-sum
Normal file
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: patch-sum,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
|
||||
MD5 (patch-aa) = 412d245c2e30f25e90ee18c4948c864a
|
||||
MD5 (patch-ac) = 3ba80a0d46fd5298fce62c7cc9ff1b73
|
||||
MD5 (patch-ad) = f8e999203803dd7f52de3805e20dbf74
|
||||
MD5 (patch-ae) = 1788e7929bfc7cab88d49d01612ee529
|
27
misc/cksfv/patches/patch-aa
Normal file
27
misc/cksfv/patches/patch-aa
Normal file
|
@ -0,0 +1,27 @@
|
|||
$NetBSD: patch-aa,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
|
||||
--- Makefile.orig Thu Aug 10 22:06:59 2000
|
||||
+++ Makefile Thu Aug 10 22:07:17 2000
|
||||
@@ -17,13 +17,13 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
all:
|
||||
- cd src && gmake
|
||||
+ cd src && ${MAKE}
|
||||
|
||||
install:
|
||||
- cd src && gmake install
|
||||
+ cd src && ${MAKE} install
|
||||
|
||||
dist:
|
||||
- gmake clean
|
||||
+ ${MAKE} clean
|
||||
rm -rf ~/cksfv-1.1 && \
|
||||
cp -r . ~/cksfv-1.1 && cd ~ && rm -rf cksfv-1.1/CVS \
|
||||
&& rm -rf cksfv-1.1/src/CVS && tar cf cksfv-1.1.tar cksfv-1.1 \
|
||||
@@ -38,4 +38,4 @@
|
||||
clean:
|
||||
rm -f *.o *~ *.core
|
||||
rm -f rpm/*.o rpm/*~ rpm/*.core
|
||||
- cd src && gmake clean
|
||||
+ cd src && ${MAKE} clean
|
22
misc/cksfv/patches/patch-ac
Normal file
22
misc/cksfv/patches/patch-ac
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-ac,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
|
||||
--- src/cksfv.c.orig Thu Aug 10 22:54:48 2000
|
||||
+++ src/cksfv.c Thu Aug 10 23:00:16 2000
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-extern int readsfv(char*, char*, int);
|
||||
+extern int readsfv(char*, char*, int, int, char **);
|
||||
extern int newsfv(char**);
|
||||
extern void pusage();
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
argv += optind;
|
||||
|
||||
if (rsfvflag == 1) {
|
||||
- rval = readsfv(sfvfile, dir, nocase);
|
||||
+ rval = readsfv(sfvfile, dir, nocase, argc, argv);
|
||||
} else {
|
||||
if (argc < 1) {
|
||||
pusage();
|
48
misc/cksfv/patches/patch-ad
Normal file
48
misc/cksfv/patches/patch-ad
Normal file
|
@ -0,0 +1,48 @@
|
|||
$NetBSD: patch-ad,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
|
||||
--- src/readsfv.c.orig Thu Aug 10 22:50:02 2000
|
||||
+++ src/readsfv.c Thu Aug 10 23:01:30 2000
|
||||
@@ -33,12 +33,13 @@
|
||||
|
||||
extern int verbose;
|
||||
|
||||
-int readsfv(char *fn, char *dir, int nocase)
|
||||
+int readsfv(char *fn, char *dir, int nocase, int argc, char **argv)
|
||||
{
|
||||
FILE *fd;
|
||||
DIR *dirp = NULL;
|
||||
char buf[512], *end, filename[512], crc[9], path[256];
|
||||
int file, rval = 0;
|
||||
+ int i, check;
|
||||
unsigned long len, val, sfvcrc;
|
||||
struct dirent *dirinfo;
|
||||
|
||||
@@ -79,6 +80,19 @@
|
||||
strncpy(filename, buf, 512);
|
||||
sfvcrc = strtoul(crc, '\0', 16);
|
||||
|
||||
+ if (argc) {
|
||||
+ check = 0;
|
||||
+ for (i=0; i<argc; i++) {
|
||||
+ if ((nocase == 1 && strcasecmp(argv[i], filename) == 0)
|
||||
+ || (nocase == 0 && strcmp(argv[i], filename) == 0)) {
|
||||
+ check = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (check == 0)
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
if (nocase == 1) {
|
||||
len = strlen(filename);
|
||||
while ((dirinfo = readdir(dirp)) != NULL) {
|
||||
@@ -126,6 +140,8 @@
|
||||
}
|
||||
}
|
||||
fclose(fd);
|
||||
+ if (nocase == 1)
|
||||
+ closedir(dirp);
|
||||
|
||||
if (verbose == 1) {
|
||||
if (rval == 0) {
|
21
misc/cksfv/patches/patch-ae
Normal file
21
misc/cksfv/patches/patch-ae
Normal file
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-ae,v 1.1.1.1 2000/08/13 22:03:08 wiz Exp $
|
||||
|
||||
--- README.orig Sun Aug 13 23:33:33 2000
|
||||
+++ README Sun Aug 13 23:36:07 2000
|
||||
@@ -48,6 +48,16 @@
|
||||
------------------------------------------------------------
|
||||
Everything OK
|
||||
|
||||
+ If you do not want to check all files liste in an .sfv file, name the
|
||||
+ files you want checked on the command line:
|
||||
+
|
||||
+ $ cksfv -f new_files.sfv -i COPYING ChangeLog
|
||||
+ --( Verifying file: new_files.sfv )-------------------------
|
||||
+ COPYING: OK
|
||||
+ ChangeLog: OK
|
||||
+ ------------------------------------------------------------
|
||||
+ Everything OK
|
||||
+
|
||||
Now for creating your own .sfv files. You can run the following command.
|
||||
|
||||
$ cksfv * > mine.sfv
|
1
misc/cksfv/pkg/COMMENT
Normal file
1
misc/cksfv/pkg/COMMENT
Normal file
|
@ -0,0 +1 @@
|
|||
check and create simple file verification (SFV) listings
|
3
misc/cksfv/pkg/DESCR
Normal file
3
misc/cksfv/pkg/DESCR
Normal file
|
@ -0,0 +1,3 @@
|
|||
cksfv can create simple file verification (SFV) listings and test
|
||||
already created SFV files. SFV files are used to verify file
|
||||
integrity via a 32 bit CRC.
|
4
misc/cksfv/pkg/PLIST
Normal file
4
misc/cksfv/pkg/PLIST
Normal file
|
@ -0,0 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.1.1.1 2000/08/13 22:03:07 wiz Exp $
|
||||
bin/cksfv
|
||||
share/doc/cksfv/README
|
||||
@dirrm share/doc/cksfv
|
Loading…
Reference in a new issue