--- jacksum-1.7.0.orig/debian/changelog +++ jacksum-1.7.0/debian/changelog @@ -0,0 +1,23 @@ +jacksum (1.7.0-4) unstable; urgency=low + + * Applied patch by Ralph Plawetzki (Closes: #514299, #555688) + + -- Anuradha Weeraman (anu) Sat, 01 Nov 2014 18:21:52 +0530 + +jacksum (1.7.0-3) unstable; urgency=low + + * Updated build scripts, fixed warnings + + -- Anuradha Weeraman (anu) Sun, 26 Oct 2014 11:06:53 +0530 + +jacksum (1.7.0-2) unstable; urgency=low + + * Improved man page. + + -- Anuradha Weeraman (anu) Tue, 06 May 2008 17:28:11 -0400 + +jacksum (1.7.0-1) unstable; urgency=low + + * Initial release (Closes: #474640) + + -- Anuradha Weeraman (anu) Sun, 06 Apr 2008 15:28:45 -0400 --- jacksum-1.7.0.orig/debian/compat +++ jacksum-1.7.0/debian/compat @@ -0,0 +1 @@ +9 --- jacksum-1.7.0.orig/debian/control +++ jacksum-1.7.0/debian/control @@ -0,0 +1,36 @@ +Source: jacksum +Section: utils +Priority: extra +Maintainer: Anuradha Weeraman (anu) +Build-Depends: debhelper (>= 9), unzip, wget +Build-Depends-Indep: default-jdk, ant, javahelper +Standards-Version: 3.9.6 +Homepage: http://www.jonelo.de/java/jacksum/ + +Package: jacksum +Architecture: all +Depends: default-jre, ${misc:Depends} +Recommends: ${java:Recommends} +Description: computes checksums, CRCs and message digests + Jacksum is a free and platform independent software for computing and + verifying checksums, CRCs and message digests. Jacksum features both a + commandline interface and an open API. + . + Jacksum supports 58 popular algorithms (Adler32, BSD sum, Bzip2's CRC-32, + POSIX cksum, CRC-8, CRC-16, CRC-24, CRC-32 (FCS-32), CRC-64, ELF-32, + eMule/eDonkey, FCS-16, GOST R 34.11-94, HAS-160, HAVAL (3/4/5 passes, + 128/160/192/224/256 bits), MD2, MD4, MD5, MPEG-2's CRC-32, RIPEMD-128, + RIPEMD-160, RIPEMD-256, RIPEMD-320, SHA-0, SHA-1, SHA-224, SHA-256, + SHA-384, SHA-512, Tiger-128, Tiger-160, Tiger, Tiger2, Tiger Tree + Hash, Tiger2 Tree Hash, Unix System V sum, sum8, sum16, sum24, sum32, + Whirlpool-0, Whirlpool-1, Whirlpool and xor8). + . + Some of the additional features include: + . + - Fully customizable output + - Customized CRC algorithms and support for combination of multiple algorithms + - By default, output is 100% compatible with Unix-standard tools such + as sum, cksum, md5sum and sha1sum + - Supports verification of both the content and timestamp of files + - Large file aware + - Recursive file processing --- jacksum-1.7.0.orig/debian/copyright +++ jacksum-1.7.0/debian/copyright @@ -0,0 +1,103 @@ +This package was debianized by Anuradha Weeraman on +Sun, 06 Apr 2008 15:28:45 -0400. + +It was downloaded from http://www.jonelo.de/java/jacksum/ + +Upstream Author: + + Dipl.-Inf. (FH) Johann Nepomuk Loefflmann + +Copyrights: + + Copyright (C) 2002-2006 Dipl.-Inf. (FH) Johann N. Loefflmann + Copyright (C) 2001-2006 Dipl.-Inf. (FH) Johann Nepomuk Loefflmann + Copyright (C) 2000-2005 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + Copyright (C) 2000, 2001, 2002, 2003 Josh Coalson + Copyright (C) 2000, 2001 Markus Friedl + GNU Crypto: Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +Licenses: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; + if not, write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02110-1301 USA + +Portions of this software (GNU crypto) are licensed under GPL + Classpath exception: + + The software in this package is distributed under the GNU General Public + License (with "Library Exception" described below). + + A copy of GNU General Public License (GPL) is included in this distribution, + in the file COPYING. If you do not have the source code, it is available at: + + http://www.gnu.org/software/classpathx/crypto + + In addition, the files distributed under GPL include the following special + exception: + + As a special exception, if you link this library with other files to + produce an executable, this library does not by itself cause the + resulting executable to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why the + executable file might be covered by the GNU General Public License. + + As such, this software can be used to run Free as well as proprietary + applications and applets: static linking is permitted, so this can even be + used in embedded configurations. + +Portions of this software are licensed under the MIT/X11 license: + + Copyright (c) 2000-2005 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO + EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Portions of this software are licensed under the BSD license: + + Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The Debian packaging is (C) 2008, Anuradha Weeraman and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- jacksum-1.7.0.orig/debian/dirs +++ jacksum-1.7.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/java --- jacksum-1.7.0.orig/debian/docs +++ jacksum-1.7.0/debian/docs @@ -0,0 +1,3 @@ +readme_de.txt +readme.txt +docs/collisions.zip --- jacksum-1.7.0.orig/debian/examples +++ jacksum-1.7.0/debian/examples @@ -0,0 +1 @@ +docs/collisions.zip --- jacksum-1.7.0.orig/debian/get-orig.sh +++ jacksum-1.7.0/debian/get-orig.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +VERSION=$2 +SOURCE=$(dpkg-parsechangelog | sed -ne 's,Source: \(.*\),\1,p') + +DIR=jacksum +TAR=../${SOURCE}_${VERSION}.orig.tar.gz + +[ -e jacksum ] || mkdir $DIR +unzip -d $DIR $3 +tar -c -z -f $TAR $DIR +rm -rf $DIR $3 --- jacksum-1.7.0.orig/debian/jacksum.1 +++ jacksum-1.7.0/debian/jacksum.1 @@ -0,0 +1,1409 @@ +.TH JACKSUM "1" "May 2008" "JACKSUM" + +.SH NAME +jacksum \- computes checksums, CRCs and message digests + +.SH SYNOPSIS +\fBjacksum\fR [\fIOPTIONS\fR]... [\fIFILE\fR]... +.br +\fBjava -jar /usr/share/java/jacksum.jar\fR [\fIOPTIONS\fR]... [\fIFILE\fR]... +.br +\fBjava -cp /usr/share/java/jacksum.jar Jacksum\fR [\fIOPTIONS\fR]... [\fIFILE\fR]... + +.SH DESCRIPTION +Jacksum is a free and platform independent utility for computing +and verifying checksums, CRCs and hashes (message digests) as well +as timestamps of files. Jacksum is written entirely in Java. A Java +Runtime Environment (JRE), at least version 1.3.1 or any equivalent JRE +is required. At least JRE 1.4.2 is recommended. + +The following parameters are supported: + +.TP +\fBfile\fR +a path name of a file to be checked. Wildcards are supported. They depend +on the shell you are running. With no file, or when the file is character +"-", standard input is read. + +.PP +The following options are supported: + +.TP +\fB-a algo\fR +the algorithm, default is sha-1 since Jacksum 1.0.0, see also -A. +Algorithms can be combinded by the plus character, e. g. "sha1+crc32", +"bsd+crc24+xor8". If you specify "-a all" all supported algorithms +are used, see also -F. As soon as "all" or a plus character is used, the +output is normalized with a hex checksum and a decimal filesize. Examples: +"sha+", "md5+". Feature available since Jacksum 1.7.0, see also -A, -F. + +.TP +\fB-A\fR +Alternate. By default Jacksum uses algorithms provided by the Java API if +available, because those are optimized by the JVM vendor, they usually +provide very good performance. If -A is set, Jacksum uses an alternate, +pure Java implementation of an algorithm (if available). Actually, Jacksum +supports alternate implementations for the following algorithms: adler32, +crc32, md5, sha-1, sha-256, sha-384, sha-512 since Jacksum 1.5.0, see +also -a. + +.TP +\fB-c list\fR +checks the integrity against a given list. The list is usually a former +output of Jacksum, ideally created with option -m. You can also check +against a list which was created by a different application. In this case, +you need to specify all parameters which are necessary to produce the +same output. The parameter -F will be ignored. To exclude files, just +remove lines from the list. Feature available since Jacksum 1.3.0, see +also -l -I and -m. + +.TP +\fB-d\fR +directories (regular) only. Don't follow symbolic links on Linux/Unix. A +symbolic link from a subfolder to a parent folder could cause endless +loops under Unix/Linux while recursively traversing the tree. If this +option is set, symbolic links to directories will be ignored. This option +will be ignored under Windows. Feature available since Jacksum 1.5.0, +See also -r. + +.TP +\fB-e seq\fR +expectation. A sequence for the calculation is expected. Works with a +file, standard input or option -q. Returns OK (exit code 0) or MISMATCH +(exit code 1). Available since Jacksum 1.4.0. Works also with multiple +files or directories to find duplicates, in which case all findings are +printed out. The sequence can be specified either case sensitive or +case insensitive, except if Base 64 encoding (by -E) has been specified. +Available since Jacksum 1.6.0, see also -a, -q, -E, -x and -X. + +.TP +\fB-E encoding\fR +encoding. The checksum can be encoded: + +.nf +bin Binary +dec Decimal +oct Octal +hex Hexadecimal in lowercase (same as -x) +hexup Hexadecimal in uppercase (same as -X) +base16 Base 16 (as defined by RFC 3548) +base32 Base 32 (as defined by RFC 3548) +base64 Base 64 (as defined by RFC 3548) +bb BubbleBabble (used by OpenSSH and SSH2) + +available since Jacksum 1.6.0, see also -x and -X. + +.TP +\fB-f\fR +process files only, this option suppresses the messages "... Is a +directory" and " ... Is not a regular file". Available since +Jacksum 1.0.0, see also -V. + +.TP +\fB-F format\fR +Set a customizable output format to overwrite the default. +Available since Jacksum 1.5.0, if not other specified, see also +-a, -E, -g, -G, -p, -P, -s, -t, -x, -X. + +.nf +#ALGONAME will be replaced by the name of the algorithm +#ALGONAME{i} see also #CHECKSUM{i} +#CHECKSUM will be replaced by the hash, CRC or sum value + (depends on -a, -b, -g, -G, -x, -X) +#CHECKSUM{i} If the character called + has been used to + separate multiple algorithms at option -a, the + token will be replaced with the checksum. The + token is indexed by a number. If you use the + character called i rather than a number, it + works like an automatic index. (1.6) +#FILENAME will be replaced by the filename and path (depends + on -p and -P) +#FILENAME{NAME} will be replaced by the filename (1.5) +#FILENAME{PATH} will be replaced by the filepath (1.5) +#FILESIZE will be replaced by the filesize +#FINGERPRINT is an alias for #CHECKSUM +#SEPARATOR will be replaced by the separator which you can + specify with -s +#TIMESTAMP will be replaced by the timestamp (depends on -t) +#QUOTE will be replaced by one quote char (") +.fi + +.TP +\fB-g count\fR +group the hex output for the checksum in "count" bytes for +better readability. Only valid if encoding is hex or hexup. +Groups are separated by a blank or by the character specified by +-G. The value for count must be greater than 0. Available since Jacksum +1.6.0, see also -E, -G, -x and -X -G char group character. Only +valid if encoding is hexadecimal and -g has been set. + +.TP +\fB-h [lang] [section]\fR +print help, valid codes for "lang" are "en" or "de", default is "en"; +valid values for "section" are strings like headers or options. See +section EXAMPLES for more information. Available since Jacksum 1.0.0, +parameter section since Jacksum 1.6.0, see also -v. + +.TP +\fB-I string\fR +ignore. While creating a list by -m or reading a list by -c, lines are +ignored if they start with the specified string. Available since Jacksum +1.6.0, see also -c and -m. + +.TP +\fB-l\fR +list. Just list files which were modified or deleted. In combination +with -c only. Available since Jacksum 1.4.0, see also -c. + +.TP +\fB-m\fR +print metainfo. Additional lines will be printed. With the +metainfo available you can check files against a given list +without the need to specify a lot of commandline parameters. +Any customized format you can normally specify with -F are +ignored. Available since Jacksum 1.3.0, see also -c. + +.TP +\fB-o file\fR +output. The output of the program goes to a file rather than the standard +output. The program exits with a warning if the file exists. The +file which is specified by -o is excluded from the calculation +process. Available since Jacksum 1.6.0, see also -O, -u and -U. + +.TP +\fB-O file\fR +output. Same as -o, however an existing file will be overwritten without +any warning. See also -U. Available since Jacksum 1.6.0, see also -o, +-u and -U. + +.TP +\fB-p\fR +path. Put the path info on each line, instead of printing a header for +each directory while processing folders recursively (-r). With this +option the output will increase, but on the flip side it will be much +easier to sort or grep the lines with corresponding programs. Available +since Jacksum 1.4.0, see also -F, -P, -r and -w. + +.TP +\fB-P char\fR +path separator. By default, the system-dependent default file name +separator character is used. On Unix systems the character is the slash +(/), on Microsoft Windows systems it is the back slash (\\). You can +change the default if a special output format for filenames (such as HTML +links) is required. Available since Jacksum 1.5.0, see also -F and -p. + +.TP +\fB-q [type:]seq\fR +process a sequence quickly and quit the program. The type can be +used to specify the type of the sequence (text, hexadecimal +or decimal): + +.nf +txt:Example1 +hex:4578616D706C6531 +dec:69,120,97,109,112,108,101,49 +4578616D706C6531 +.fi + +If type is not set, the seq is expected to be in hex form. +If type is set to "txt", the platform's default charset will +be used to interpret the sequence called seq. Available since Jacksum +1.3.0 (hex only), type since 1.5.0. + +.TP +\fB-r\fR +process subdirectory recursively (without a file parameter the current +directory is used). Available since Jacksum 1.0.0, see also -p and -w. + +.TP +\fB-s sep\fR +a custom separator string (\\t, \\n, \\r, \\", \\' and \\\\ +will be translated). The default value depends on the checksum +algorithm. Available since Jacksum 1.0.0, see also -F. + +.TP +\fB-S\fR +summary. This calculates just one checksum value. All files, +the directory structures, the filenames and timestamps +(if requested) are part of that checksum. See also -w. +Available since Jacksum 1.5.0, see also -r and -w. + +.TP +\fB-t form\fR +a timestamp format. Java's formatter class SimpleDateFormat +will be used. Valid characters are + +.nf +G Era designator +y Year +M Month in year +w Week in year +W Week in month +D Day in year +d Day in month +F Day of week in month +E Day in week +a AM/PM marker +H Hour in day (0-23) +k Hour in day (1-24) +K Hour in am/pm (0-11) +h Hour in am/pm (1-12) +m Minute in hour +s Second in minute +S Millisecond +z Time zone, general +Z Time zone, RFC 822 +.fi + +If form is set to the word "default", timestamps will be +formatted with "yyyyMMddHHmmss". since Jacksum 1.3.0 + +.nf +#SEPARATOR will be replaced by the separator which you + can specify with -s +#QUOTE will be replaced by one quote char (") +.fi + +Available since Jacksum 1.6.0, see also -F. + +.TP +\fB-u file\fR +ugly, undesirable, unforeseen, uninvited. Any error messages of +the program is redirected to a file rather than the standard error. +The program exits if the file exists. The file which is specified by -u +is excluded from the calculation process. Available since Jacksum 1.6.0, +see also -U, -o and -O. + +.TP +\fB-U file\fR +ugly, undesirable, unforeseen, uninvited. Same as -u, however an existing +file will be overwritten without any warning. See also -O. Available +since Jacksum 1.6.0, see also -u, -o and -O. + +.TP +\fB-v\fR +version. Prints the product version and exits. Available since Jacksum +1.2.0, see also -h. + +.TP +\fB-V control\fR +verbose. Prints additional information. If -V is the only +parameter it behaves like -v. "control" can be one of the +following keywords which must be separated by a comma: + +.nf +details | nodetails Errors with or without details +warnings | nowarnings Warnings or no warnings +summary | nosummary Summary at the end or not +.fi + +If control is set to "default", control is set to +"details,warnings,nosummary". Available since Jacksum 1.6.0, see also +-f and -v. + +.TP +\fB-w\fR +The file parameter (the last parameter) is intended to be the working +directory. This allows to create relative path names rather than absolute +ones. Only valid if the file parameter is a directory. Available since +Jacksum 1.6.0, see also -r and -S. + +.TP +\fB-x\fR +lowercase hex output for the checksum, it is an alias for -E +hex. Available since Jacksum 1.1.0, see also -E. + +.TP +\fB-X\fR +uppercase hex output for the checksum, it is an alias for -E hexup. +Available since Jacksum 1.1.0, see also -E. + +.TP +The following algorithms are supported: + +.nf +\fBadler32, adler-32\fR +algorithm: + Adler32 [java.util.zip.Adler32] +length: + 32 bits +type: + checksum, 1995 +since: + Jacksum 1.0.0 (alias "adler-32" since 1.2.0) +comment: + Adler32 was invented by Mark Adler in 1995. + The specification for Adler32 may be found + in RFC 1950. Adler32 is a 32-bit extension + and improvement of the Fletcher algorithm, + used in the ITU-T X.224 / ISO 8073 standard. + [jonelo.jacksum.algorithm.Adler32alt] is the + alternate implementation and it is used if + option -A is specified. +.fi + +.nf +\fBbsd, bsdsum, sumbsd\fR +algorithm: + BSD checksum algorithm +length: + 16 bits +type: + checksum +since: + Jacksum 1.0.0 (alias "bsdsum" since 1.2.0, alias + "sumbsd" since 1.6.0) +comment: + output format is exactly like the native + program sum (size in 1024 byte blocks) + see also sysv + - under BeOS it is /bin/sum [-r] + - under FreeBSD it is /usr/bin/sum + and /usr/bin/cksum -o 1 + - under HP-UX it is /usr/bin/sum -r + - under IBM AIX it is /usr/bin/sum [-r] + - under Linux it is /usr/bin/sum [-r] + - under MacOS X it is /usr/bin/sum + and /usr/bin/cksum -o 1 + - under Solaris it is /usr/ucb/sum + - under Windows there is no sum +.fi + +.nf +\fBcksum\fR +algorithm: + POSIX 1003.2 CRC algorithm +length: + 32 bits +type: + crc +since: + Jacksum 1.0.0 +comment: + - under BeOS it is /bin/cksum + - under FreeBSD it is /usr/bin/cksum + - under HP-UX it is /usr/bin/cksum and + /usr/bin/sum -p + - under IBM AIX it is /usr/bin/cksum + - under Linux it is /usr/bin/cksum + - under MacOS X it is /usr/bin/cksum + - under Solaris it is /usr/bin/cksum + - under Tru64 ist es /bin/cksum (CMD_ENV=xpg4) + - under Windows there is no cksum + The POSIX CRC cannot be described completely + by the Rocksoft-Model, because the algorithm + appends the message with its length. Without + this special, the code would be: + crc:32,04C11DB7,0,false,false,FFFFFFFF +.fi + +.nf +\fBcrc64, crc-64\fR +algorithm: + CRC-64 +length: + 64 bits +type: + crc:64,1B,0,true,true,0 +since: + Jacksum 1.5.0 +comment: + this algorithm is described in the + ISO 3309 standard. + (generator poly is x^64 + x^4 + x^3 + x + 1) +.fi + +.nf +\fBelf, elf32, elf-32\fR +algorithm: + ELF +length: + 32 bits +type: + hash +since: + Jacksum 1.5.0 +comment: + hash function used in the Unix ELF (Executable + and Linkable Format) for object files. +.fi + +.nf +\fBed2k, emule, edonkey\fR +algorithm: + eMule/eDonkey +length: + 128 bits +type: + hash +since: + Jacksum 1.5.0 +comment: + this algorithm is used in eDonkey resp. eMule, + it is based on MD4, but returns different + fingerprints for files >= 9500 KB. +.fi + +.nf +\fBgost\fR +algorithm: + GOST R 34.11-94 + [org.bouncycastle.crypto.digests.GOST3411Digest] +length: + 256 bits +type: + hash, 1994 +since: + Jacksum 1.6.0 +comment: + "GOsudarstvennyi STandard", Russian for + "Government Standard". Published in 1994 as + the Soviet Standard GOST-R-34.11-94. +.fi + +.nf +\fBhas160, has-160, has160\fR +algoritm: + HAS-160 [gnu.crypto.hash.Has160 (jonelo)] +length: + 160 bits +type: + hash, 2000 +since: + Jacksum 1.7.0 +comment: + HAS-160 is both a cryptographic hash function and + a Korean TTA-Standard (Telecommunications and + and Technology Association). +.fi + +.nf +\fBhaval, haval__\fR +algorithm: + Haval [gnu.crypto.hash.Haval] +length: + 128, 160, 192, 224 or 256 bits +type: + hash, 1992 +since: + Jacksum 1.4.0 +comment: + Haval was invented by Yuliang Zheng, Josef + Pieprzyk, and Jennifer Seberry in 1992. + The Haval message-digest algorithm has a + variable output length, with variable number of + rounds. The output length can vary from 128 + to 256 bits in increments of 32 bits. The + number of rounds can vary from 3 to 5. The + default values (just "haval") are 128 and 3. +.fi + +.nf +\fBmd2, md2sum\fR +algorithm: + MD2 [gnu.crypto.hash.MD2] +length: + 128 bits +type: + hash, 1989 +since: + Jacksum 1.2.0 +comment: + the MD2 message digest algorithm as defined in + RFC 1319; + RSA Laboratories, in their Bulletin #4, dated + November 12, 1996, recommends to update + applications away from MD2 whenever it is + practical. + Jacksum supports MD2 for compatibility and educational + purposes. +.fi + +.nf +\fBmd4, md4sum\fR +algorithm: + MD4 [gnu.crypto.hash.MD4] +length: + 128 bits +type: + hash, 1990 +since: + Jacksum 1.2.0 +comment: + the MD4 message digest algorithm as defined in + RFC 1320; + RSA Laboratories, in their Bulletin #4, dated + November 12, 1996, recommends that MD4 should + not be used. + Jacksum supports MD4 for compatibility and educational + purposes. +.fi + +.nf +\fBmd5, md5sum\fR +algorithm: + MD5 [java.security.MessageDigest] +length: + 128 bits +type: + hash, 1991 +since: + Jacksum 1.0.0 +comment: + The MD5 message digest algorithm was designed by + Ronald Rivest in 1991, and it is defined in + RFC 1321. [gnu.crypto.hash.MD5] is the alternate + implementation and it will be used if you have + set the option -A. + - under BeOS it is /bin/md5sum + - under FreeBSD it is /sbin/md5 + - under HP-UX there is no md5 or md5sum + - under Linux it is /usr/bin/md5sum + - under MacOS X it is /usr/bin/md5 + - under Solaris it is /usr/sbin/md5 (SUNWkeymg) + - under Windows there is no md5 or md5sum +.fi + +.nf +\fBnone\fR +algorithm: + none +length: + 0 bits +type: + n/a +since: + Jacksum 1.6.0 +comment: + Calculates no checksum, it does not read the + content of files, it just determines the + filesize (and timestamp if required) +.fi + +.nf +\fBcrc:\fR +algorithm: + CRC +length: + 8..64 bits +type: + crc +since: + Jacksum 1.7.0 +comment: + With this generic CRC you can specify all CRC- + algorithms which can be described by the famous + "Rocksoft (tm) Model CRC Algorithm". + must have 6 values, which must be + separated by a comma. Those are: + width,poly,init,refIn,refOut,xorOut + + width - width of the crc, expressed in bits. + This is one less than the width of + the poly. + + poly - the polynomial, specify as hex + The top bit of the poly should be + omitted. For example, if the poly is + 10110, you should specify 06. An + important aspect of this parameter + is that it represents the unreflected + poly; the bottom bit of this parameter + is always the LSB of the divisor + during the division regardless of + whether the algorithm being modelled + is reflected. + + init - this parameter specifies the initial + value of the register when the + algorithm starts. Specify as hex. + + refIn - this is a boolean parameter. If it + is false, input bytes are processed + with bit 7 being treated as the most + significant bit (MSB) and bit 0 being + treated as the least significant bit. + If this parameter is false, each byte + is reflected before being processed. + true or false + + refOut - this is a boolean parameter. If it is + set to false, the final value in the + register is fed into the xorOut stage + directly, otherwise, if this parameter + is true, the final register value is + reflected first. + + xorOut - this value is XORed to the final + register value (after the refOut) + stage before the value is returned as + the official checksum, specify as hex +.fi + +.nf +\fBread\fR +algorithm: + read +length: + 0 bits +type: + n/a +since: + Jacksum 1.6.0 +comment: + Calculates no checksum, but it does read the + content of files, it also determines the + filesize (and timestamp if required) +.fi + +.nf +\fBrmd128, rmd-128, ripemd128, ripemd-128, ripe-md128\fR +algorithm: + RIPEMD-128 [gnu.crypto.hash.RipeMD128] +length: + 128 bits +type: + hash +since: + Jacksum 1.2.0 (alias rmd128/rmd-128 since 1.4.0) +comment: + a message digest, see also RIPEMD-160 +.fi + +.nf +\fBrmd160, rmd-160, ripemd160, ripemd-160, ripe-md160\fR +algorithm: + RIPEMD-160 [gnu.crypto.hash.RipeMD160] +length: + 160 bits +type: + hash, 1996 +since: + Jacksum 1.2.0 (alias rmd160/rmd-160 since 1.4.0) +comment: + RIPEMD was developed in the framework of the + EU project RIPE (RACE Integrity Primitives + Evaluation), used by GnuPG +.fi + +.nf +\fBrmd256, rmd-256, ripemd256, ripemd-256, ripe-md256\fR +algorithm: + RIPEMD-256 [org.bouncycastle.crypto.digests] +length: + 256 bits +type: + hash +since: + Jacksum 1.6.0 +comment: + a message digest, see also RIPEMD-160 + RIPEMD-256 is as secure as RIPEMD-128 +.fi + +.nf +\fBrmd320, rmd-320, ripemd320, ripemd-320, ripe-md320\fR +algorithm: + RIPEMD-320 [org.bouncycastle.crypto.digests] +length: + 128 bits +type: + hash +since: + Jacksum 1.6.0 +comment: + a message digest, see also RIPEMD-160 + RIPEMD-320 is as secure as RIPEMD-160 +.fi + +.nf +\fBsha0, sha-0\fR +algorithm: + SHA-0 [gnu.crypto.hash.Sha0 (jonelo)] +length: + 160 bits +type: + hash, 1993 +since: + Jacksum 1.6.0 +comment: + the Secure Hash Algorithm, as defined 1993 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (FIPS PUB 180). + It was withdrawn by NSA shortly after + publication and was superseded by the revised + version, published in 1995 in FIPS PUB 180-1 + and commonly referred to as "SHA-1". +.fi + +.nf +\fBsha, sha1, sha-1, sha160, sha-160\fR +algorithm: + SHA-1 [java.security.MessageDigest] +length: + 160 bits +type: + hash, 1995 +since: + Jacksum 1.0.0 (alias sha-1 since 1.2.0, alias + sha-160. sha160 and sha-160 since 1.5.0, default + algorithm since 1.5.0. +comment: + the Secure Hash Algorithm, as defined 1995 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (NIST FIPS 180-1). + [gnu.crypto.hash.Sha160] is the alternate + implementation and it will be used if you have + specified option -A. + - under BeOS there is no sha1 + - under FreeBSD it is /sbin/sha1 + - under HP-UX there is no sha1 + - under Linux it is /usr/bin/sha1sum + - under MacOS X there is no sha1 + - under Solaris there is no sha1 + - under Windows there is no sha1 +.fi + +.nf +\fBsha224, sha-224\fR +algorithm: + SHA-224 [gnu.crypto.hash.Sha224 (jonelo)] +length: + 224 bits +type: + hash, 2004 +since: + Jacksum 1.6.0 +comment: + the Secure Hash Algorithm, as defined 2004 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (NIST FIPS 180-2) and in RFC 3874. + SHA-224 is based on SHA-256, but it uses a + different initial value and the final hash + is truncated to 224 bits. +.fi + +.nf +\fBsha256, sha-256\fR +algorithm: + SHA-256 [java.security.MessageDigest] +length: + 256 bits +type: + hash, 2001 +since: + Jacksum 1.3.0 +comment: + the Secure Hash Algorithm, as defined 2001 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (NIST FIPS 180-2). + [gnu.crypto.hash.Sha256] is an alternate + implementation and it is used if you have a + JRE < 1.4.2 or if you have specified option -A. +.fi + +.nf +\fBsha384, sha-384\fR +algorithm: + SHA-384 [java.security.MessageDigest] +length: + 384 bits +type: + hash, 2001 +since: + Jacksum 1.3.0 +comment: + the Secure Hash Algorithm, as defined 2001 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (NIST FIPS 180-2). + [gnu.crypto.hash.Sha384] is an alternate + implementation and it is used if you have a + JRE < 1.4.2 or if you have specified option -A. +.fi + +.nf +\fBcrc8, crc-8\fR +algorithm: + CRC-8 +length: + 8 bits +type: + crc:8,7,0,false,false,0 +since: + Jacksum 1.6.0 +comment: + this implementation of the CRC-8 (cyclic + redundancy check) is used in the + System Management Bus (SMBus) and the + Free Lossless Audio Codec (FLAC) for example + (generator poly x^8 + x^2 + x^1 + 1) +.fi + +.nf +\fBsha512, sha-512\fR +algorithm: + SHA-512 [java.security.MessageDigest] +length: + 512 bits +type: + hash, 2001 +since: + Jacksum 1.3.0 +comment: + the Secure Hash Algorithm, as defined 2001 in + the National Institute for Standards and + Technology's Federal Information Processing + Standard (NIST FIPS 180-2). + [gnu.crypto.hash.Sha512] is an alternate + implementation and it is used if you have a + JRE < 1.4.2 or if you have specified option -A. +.fi + +.nf +\fBsum8, sum-8\fR +algorithm: + Sum 8 +length: + 8 bits +type: + checksum +since: + Jacksum 1.3.0 +comment: + value computed by adding together all values + in the input data stream modulo 2^8. + This algorithm doesn't care about the + arrangement of bytes. +.fi + +.nf +\fBsum16, sum-16\fR +algorithm: + Sum 16 +length: + 16 bits +type: + checksum +since: + Jacksum 1.3.0 +comment: + value computed by adding together all values + in the input data stream modulo 2^16. + This algorithm doesn't care about the + arrangement of bytes. +.fi + +.nf +\fBsum24, sum-24\fR +algorithm: + Sum 24 +length: + 24 bits +type: + checksum +since: + Jacksum 1.3.0 +comment: + value computed by adding together all values + in the input data stream modulo 2^24. + This algorithm doesn't care about the + arrangement of bytes. +.fi + +.nf +\fBsum32, sum-32\fR +algorithm: + Sum 32 +length: + 32 bits +type: + checksum +since: + Jacksum 1.3.0 +comment: + value computed by adding together all values + in the input data stream modulo 2^32. + This algorithm doesn't care about the + arrangement of bytes. +.fi + +.nf +\fBsysv, sysvsum, sumsysv\fR +algorithm: + UNIX System V checksum algorithm +length: + 16 bits +type: + checksum, 1985 +since: + Jacksum 1.2.0, alias "sumsysv" since 1.6.0 +comment: + output format is exactly like the properitary + program sum (size in 512 bytes blocks), + see also bsd + - under BeOS it is /bin/sum -s + - under FreeBSD it is /usr/bin/cksum -o 2 + - under HP-UX it is /usr/bin/sum + - under Linux it is /usr/bin/sum -s + - under MacOS X it is /usr/bin/cksum -o 2 + - under Solaris it is /usr/bin/sum + - under Windows there is no sum +.fi + +.nf +\fBtiger128, tiger-128\fR +algorithm: + Tiger 128 [gnu.crypto.hash.Tiger160 (by jonelo)] +length: + 128 bits +type: + hash, 1995 +since: + Jacksum 1.6.0 +comment: + the hash value is the first 128 bits of the + result of Tiger-192 +.fi + +.nf +\fBtiger160, tiger-160\fR +algorithm: + Tiger 160 [gnu.crypto.hash.Tiger160 (by jonelo)] +length: + 160 bits +type: + hash, 1995 +since: + Jacksum 1.6.0 +comment: + the hash value is the first 160 bits of the + result of Tiger-192 +.fi + +.nf +\fBtiger, tiger192, tiger-192\fR +algorithm: + Tiger [gnu.crypto.hash.Tiger] +length: + 192 bits +type: + hash, 1995 +since: + Jacksum 1.4.0 +comment: + developed by Ross Anderson and Eli Biham, 1995 +.fi + +.nf +\fBtiger2\fR +algorithm: + Tiger2 [gnu.crypto.hash.Tiger2 (jonelo)] +length: + 192 bits +type: + hash, 2005 +since: + Jacksum 1.6.0 +comment: + developed by Ross Anderson and Eli Biham, 2005 +.fi + +.nf +\fBcrc16, crc-16\fR +algorithm: + CRC-16 (ARC) +length: + 16 bits +type: + crc:16,8005,0,true,true,0 +since: + Jacksum 1.2.0 +comment: + this implementation of the CRC-16 (cyclic + redundancy check) is the most popular form + of CRC-16 algorithms + (generator poly x^16 + x^15 + x^2 + 1) + It is used by LHA, and ARC for example. +.fi + +.nf +\fBtree:\fR +algorithm: + Hash Tree +length: + dependent on the underlying algorithm +type: + hash tree, 1979 +since: + Jacksum 1.7.0 +comment: + invented by Ralph Merkle, 1979. A hash tree is a + tree of hashes in which the leaves are hashes of + data blocks. By default the tree hash is encoded + base32. Jacksum allows to calculate the root + hash of the hash tree, the following agorithms + are supported with hash trees: tiger, tiger2 + Tiger tree hashes are used in P2P file sharing + protocols and applications. +.fi + +.nf +\fBwhirlpool0, whirlpool-0\fR +algorithm: + Whirlpool-0 [gnu.crypto.hash.Whirlpool (jonelo)] +length: + 512 bits +type: + hash, 2000 +since: + Jacksum 1.6.0 +comment: + The Whirlpool Hashing Function by Paulo S.L.M. + Barreto and Vincent Rijmen, 2000. + This is the original specification of Whirlpool + from 2000. +.fi + +.nf +\fBwhirlpool1, whirlpool-1\fR +algorithm: + Whirlpool-1 [gnu.crypto.hash.Whirlpool] +length: + 512 bits +type: + hash, 2001 +since: + Jacksum 1.2.0 +comment: + The Whirlpool Hashing Function by Paulo S.L.M. + Barreto and Vincent Rijmen, 2001. + This is the first revision of the specification + of Whirlpool from 2001 with improved S-box + design: + "We propose renaming the original algorithm + Whirlpool-0 and using the term Whirlpool for + the final, modified version that uses the + improved S-box design." +.fi + +.nf +\fBwhirlpool, whirlpool2, whirlpool-2\fR +algorithm: + Whirlpool [gnu.crypto.hash.Whirlpool (jonelo)] +length: + 512 bits +type: + hash, 2003 +since: + Jacksum 1.6.0 +comment: + The Whirlpool Hashing Function by Paulo S.L.M. + Barreto and Vincent Rijmen. + This is the second revision of the specification + of Whirlpool from 2003 with improved diffusion + matrix: + "Recently [March 11, 2003], Shirai and Shibutani + discovered a flaw in the Whirlpool diffusion + matrix that made its branch number suboptimal. + Although this flaw per se does not seem to + introduce an effective vulnerability, the + present document replaces that matrix + [May 24, 2003]" +.fi + +.nf +\fBxor8, xor-8\fR +algorithm: + Exclusive-Or +length: + 8 bits +type: + checksum +since: + Jacksum 1.3.0 +comment: + value computed by xoring all values in the + input data stream. + This algorithm doesn't care about the + arrangement of bytes in a file. +.fi + +.nf +\fBcrc16_x25, crc-16_x-25, fcs16, fcs-16\fR +algorithm: + CRC-16 (Frame Checking Sequence) +length: + 16 bits +type: + crc:16,1021,FFFF,true,true,FFFF +since: + Jacksum 1.5.0 (alias _x25, _x-25 seit 1.7.0) +comment: + The Frame Checking Sequence as defined in + RFC1331. +.fi + +.nf +\fBcrc24, crc-24\fR +algorithm: + CRC-24 +length: + 24 bits +type: + crc:24,864CFB,B704CE,false,false,0 +since: + Jacksum 1.6.0 +comment: + this implementation of the CRC-24 (cyclic + redundancy check) is used by Open PGP for + example (RFC 2440). +.fi + +.nf +\fBcrc32, crc-32, fcs32, fcs-32\fR +algorithm: + CRC-32 [java.util.zip.CRC32] +length: + 32 bits +type: + crc:32,04C11DB7,FFFFFFFF,true,true,FFFFFFFF +since: + Jacksum 1.0.0 (alias crc-32 since 1.2.0, + alias fcs32 and fcs-32 since 1.5.0) +comment: + the standard algorithm CRC-32 (cyclic + redundancy check) is specified in ISO 3309, + ISO/IEC 13239:2002 and ITU-T V.42, and it + is used by PKZip, gzip, png, Ethernet, FDDI, + and WEP. That algorithm is also known as FCS + (frame checking sequence) + An alternate implementation is available (-A). + - under BeOS there is no crc32 + - under FreeBSD it is /usr/bin/cksum -o 3 + - under HP-UX there is no crc32 + - under Linux there is no crc32 + - under MacOS X it is /usr/bin/cksum -o 3 + - under Solaris there is no crc32 + - under Windows there is no crc32 +.fi + +.nf +\fBcrc32_bzip2, crc-32_bzip-2\fR +algorithm: + CRC-32 (Bzip2) +length: + 32 bits +type: + crc:32,04C11DB7,FFFFFFFF,false,false,FFFFFFFF +since: + Jacksum 1.7.0 +comment: + This CRC is used by bzip2 +.fi + +.nf +\fBcrc32_mpeg2, crc-32_mpeg-2\fR +algorithm: + CRC-32 (MPEG-2) +length: + 32 bits +type: + crc:32,04C11DB7,FFFFFFFF,false,false,0 +since: + Jacksum 1.4.0 +comment: + this algorithm implements the MPEG + specification of the CRC-32 calculation +.fi + +.TP +The output format of Jacksum: + +If you don't specify a customized format with option -F, +the following format is used: + +\fI[]\fR + +.TP +\fBchecksum\fR +is a checksum, CRC or a fingerprint; output depends on options +-a and -x, resp. -X +.TP +\fBsep\fR +is a separator; it can be modified by -s, otherwise it depends +on -a and -m +.TP +\fBfilesize\fR +is the size (bytes or blocks) of a file, it depends on -a, +the filesize won't be written by any MessageDigest-algorithm +.TP +\fBtimestamp\fR +is an optional timestamp of a file; timestamps can be requested +with -t +.TP +\fBfilename\fR +is a filename, paths can be part of the output, output depends +on -p and -P. +.fi + +.SH EXIT STATUS +.nf +0 - everthing is OK +1 - there was at least one mismatch during the verification process +>1 - in case of a parameter-, .jacksum- or I/O-error +.fi + +.SH EXAMPLES +\fBjacksum -a crc32 -q "txt:Hello World!"\fR + + calculates a 32-bit CRC of the text "Hello World!" + +\fBjacksum -a crc32 -q 48656C6C6F20576F726C6421\fR + + calculates a 32-bit CRC of the hex sequence +48656C6C6F20576F726C6421 which represents "Hello World!" + +\fBjacksum -a crc32 -x *.txt\fR + + calculates a 32 bit CRC of all textfiles within the current +folder. The checksum will be printed in a hexadecimal format (-x). + +\fBjacksum -a crc32 -f -t default .\fR + + not only CRCs will be printed, but also timestamps (-t) of +all files within the current folder (.). The message "is a +directory" will be suppressed (-f). + +\fBjacksum -f -a crc:16,1021,FFFF,false,false,0 .\fR + + a CRC with customized parameters has been used: 16 Bit, +Polynomial 1021 (hex, without the leading bit), initvalue FFFF +(hex), mirror neither the input nor the output, no xor. + +\fBjacksum -a haval_256_5 .\fR + + calculates a 256 bit hash with 5 rounds by using the haval +algorithm (haval_256_5) of all files within the current folder +(.). + +\fBjacksum -a sha1 -s "\\t" -t "EEE, MMM d, yyyy 'at' h:mm a" .\fR + + calculates a 160 bit SHA-1 Message-Digest of all files within +the current folder. The separator string (-s) is set to the +tabulator char ("\\t"). Timestamps of files will be printed +out in a customized format (-t). + +\fBjacksum -a cksum -r /mnt/share\fR + + calculates a 32 bit CRC with the standard Unix-algorithm cksum +of all files /mnt/share and it's subfolders (-r) + +\fBjacksum -a md5 -f -r -m -o list.jacksum /data\fR + + calculates the Message-Digest MD5 of all files in /data and it's +subfolders (-r), furthermore it prints metainfo (-m) and stores +output to list.jacksum, path information is stored ABSOLUTELY + +\fBjacksum -a md5 -f -r -m -o list.jacksum -w /data\fR + + calculates the Message-Digest MD5 of all files in /data and it's +subfolders (-r), furthermore it prints metainfo (-m) and stores +output to list.jacksum, path information is stored RELATIVELY + +\fBjacksum -c list.jacksum\fR + + verifies all checksums resp. timestamps stored in a file +called list.jacksum. list.jacksum must be generated first with +option -m + +\fBjacksum -a md5 -f -F "#FINGERPRINT #FILESIZE #FILENAME" *\fR + + calculates the Message-Digest MD5 of all files in the current +directory. The output format is customized, it prints also +the filesize. + +\fBjacksum -a md5 -A -V summary bigfile.iso\fR + + Among others it also returns the elapsed time (-V summary) +which was necessary to calculate the MD5 Hash of the file called +bigfile.iso by using the alternate MD5 implementation (-A). + +\fBjacksum -a crc32 -X -f -p -r -F "#FILENAME #CHECKSUM" -o list.sfv *\fR + + prints CRC-32 values in the Simple File Verificator (SFV) format + +\fBjacksum -a ed2k -f -F "ed2k://|file|#FILENAME|#FILESIZE|#FINGERPRINT|" *\fR + + calculates the edonkey hash of all files in the current +directory with a customized output format + +\fBjacksum -a ed2k -f -P / -F "#FILENAME" -r .\fR + + calculates the edonkey hash of all files in the current +directory and it's subfolders with a customized output format +(HTML) + +\fBjacksum -a tree:tiger -F "urn:#ALGONAME:#FINGERPRINT" -q hex:\fR + + calculates the root hash of the Tree Hash (aka Merkle Hash) +with the underlying Tiger algorithm of an empty input. + +\fBjacksum -a sha1+crc32 .\fR + + calculates the sha1 hash and the crc32 as a combined checksum + +\fBjacksum -a sha1+crc32 -F "#CHECKSUM{0} #CHECKSUM{1} #FILENAME" .\fR + + calculates the sha1 hash and the crc32 as separate values + +\fBjacksum -a all -F "#ALGONAME{i} (#FILENAME) = #CHECKSUM{i}" .\fR + + calculates all supported algorithms on all files in a customized +format + +\fBjacksum -a all -F "#ALGONAME{i}" -q txt:\fR + + prints names of all supported algorithms + +\fBjacksum -h synopsis\fR + + prints the SYNOPSIS section + +\fBjacksum -h haval\fR + + prints all sections containing information about haval + +\fBjacksum -h -t\fR + + prints all information about the timestamp option + +\fBjacksum -h en | more\fR + + prints the english help (use "de" for german help) + +.SH AUTHOR +Copyright (C) 2002-2006, Dipl.-Inf. (FH) Johann N. Loefflmann + + +http://www.jonelo.de/java/jacksum/index.html + +.SH LICENSE +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License with +the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; +if not, write to the Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA --- jacksum-1.7.0.orig/debian/jacksum.install +++ jacksum-1.7.0/debian/jacksum.install @@ -0,0 +1,2 @@ +jacksum-1.7.0.jar usr/share/java +unix/jacksum usr/bin --- jacksum-1.7.0.orig/debian/jacksum.links +++ jacksum-1.7.0/debian/jacksum.links @@ -0,0 +1 @@ +usr/share/java/jacksum-1.7.0.jar usr/share/java/jacksum.jar --- jacksum-1.7.0.orig/debian/manpages +++ jacksum-1.7.0/debian/manpages @@ -0,0 +1 @@ +debian/jacksum.1 --- jacksum-1.7.0.orig/debian/patches/01_newline.patch +++ jacksum-1.7.0/debian/patches/01_newline.patch @@ -0,0 +1,35 @@ +--- src/jonelo/jacksum/cli/Jacksum.java 2006-07-29 00:17:00.000000000 +0200 ++++ src/jonelo/jacksum/cli/Jacksum_patch.java 2009-08-20 19:41:08.000000000 +0200 +@@ -983,20 +983,23 @@ + _t=false; + checksum.setTimestampFormat(null); + } +- checksum.setFilename(""); +- String s=null; ++ checksum.setFilename("-"); ++ int i=0; + BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ++ StringBuffer sb=new StringBuffer(1000001); + try { + do { +- s=in.readLine(); +- if (s!=null) { ++ i=in.read(); ++ if (i > -1) { + // better than s=s+"\n"; +- StringBuffer sb=new StringBuffer(s.length()+1); +- sb.insert(0,s); +- sb.insert(s.length(),'\n'); +- checksum.update(sb.toString().getBytes()); ++ sb.append((char) i); ++ if (sb.length() > 1000000) { //process System.in in chunks ++ checksum.update(sb.toString().getBytes()); ++ sb=new StringBuffer(1000001); ++ } + } +- } while (s!=null); ++ } while (i > -1); ++ checksum.update(sb.toString().getBytes()); + summary.addBytes(checksum.getLength()); + if (_e) expectation(checksum,expected); + else System.out.println(checksum.toString()); --- jacksum-1.7.0.orig/debian/rules +++ jacksum-1.7.0/debian/rules @@ -0,0 +1,59 @@ +#!/usr/bin/make -f + +VER=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*$$/\1/p') + +JAVA_HOME=/usr/lib/jvm/default-java +ANT_HOME=/usr/share/ant + +JH_BUILD_SRC=$(CURDIR)/src + +build: build-arch build-indep + +build-arch: build-stamp + +build-indep: build-stamp + +build-stamp: + dh_testdir + unzip $(CURDIR)/source/jacksum-src.zip -d $(JH_BUILD_SRC) + patch -p0 < debian/patches/01_newline.patch + jh_build -mjonelo.jacksum.cli.Jacksum jacksum-$(VER).jar $(JH_BUILD_SRC) + touch $@ + +binary: binary-indep binary-arch + dh_testdir + dh_prep + dh_install + dh_installdocs + dh_installchangelogs + dh_installman + jh_manifest + dh_link + jh_exec + jh_depends + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install + +binary-indep: build install + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + +clean: + dh_testdir + jh_build --clean + dh_clean + -@[ -e build-stamp ] && rm -f build-stamp + -@[ -e src ] && rm -rf src + -@[ -e jacksum-$(VER).jar ] && rm jacksum-$(VER).jar + -@[ -e debian/jh_build_stamp ] && rm debian/jh_build_stamp + -@[ -e debian/stamp-ant-build ] && rm debian/stamp-ant-build --- jacksum-1.7.0.orig/debian/watch +++ jacksum-1.7.0/debian/watch @@ -0,0 +1,4 @@ +version=3 + +http://sf.net/jacksum/jacksum-([\d\.]*)\.zip \ + debian debian/get-orig.sh --- jacksum-1.7.0.orig/unix/jacksum +++ jacksum-1.7.0/unix/jacksum @@ -10,4 +10,4 @@ # the execute permissions are set up correctly (man chmod). ############################################################################## -java -jar "/mnt/share/java/apps/jacksum/jacksum.jar" "$@" +java -jar "/usr/share/java/jacksum.jar" "$@"