debian/0000755000000000000000000000000012046523240007164 5ustar debian/manpages0000644000000000000000000000000611763136303010703 0ustar ent.1 debian/control0000644000000000000000000000143111763353106010575 0ustar Source: ent Section: science Priority: optional Maintainer: Thorsten Alteholz Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), asciidoc, docbook2x Homepage: http://www.fourmilab.ch/random/ Package: ent Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: pseudorandom number sequence test program This program applies various tests to sequences of bytes stored in files and reports the results of those tests. The program is useful for those evaluating pseudorandom number generators for encryption and statistical sampling applications, compression algorithms, and other applications where the information density of a file is of interest. . Original Homepage: http://www.fourmilab.ch/random/ (Now maintained primarily in Debian.) debian/copyright0000644000000000000000000000142311763367376011144 0ustar Package Maintainers: Thorsten Alteholz from Tue, 2 Jun 2012 18:00:00 +0200 Wesley J. Landaker from Sun, 5 Sep 2004 08:25:33 -0600 Emanuele Rocca from Sun, 16 Nov 2003 17:30:41 +0100 Viral Shah from Fri, 26 Oct 2001 23:04:21 -0600. Upstream Author: John Walker Upstream Homepage: Copyright: This software is in the public domain. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. This software is provided "as is" without express or implied warranty. (The Debian packaging is released under this same license.) debian/changelog0000644000000000000000000000643512046444122011047 0ustar ent (1.1debian-3) unstable; urgency=low * debian/patches/totalcount.patch: prevent overflow (Closes: #692214) -- Thorsten Alteholz Wed, 07 Nov 2012 18:00:00 +0100 ent (1.1debian-2) unstable; urgency=low * new maintainer (Closes: #568140) * debian/control: use dehelper 9 * debian/control: bump standard to 3.9.3 (no changes) * debian/control: added old Homepage: * debian/rules: move to dh * debian/ent.install use this file for installation * debian/source/format: added * debian/watch: add empty watch file (no more upstream development) * debian/patches: changes moved to patches -- Thorsten Alteholz Tue, 05 Jun 2012 18:00:00 +0200 ent (1.1debian-1.1) unstable; urgency=low * Non-maintainer upload. * Remove private definition of log2() function; use the function provided by the C library library instead (closes: #552835). * Add ‘Depends: ${misc:Depends}’. -- Jakub Wilk Sat, 17 Jul 2010 18:41:09 +0200 ent (1.1debian-1) unstable; urgency=low * New upstream release * All Debian patches rolled in upstream * Now generates documentation with asciidoc, docbook2x * Updated to Debian Policy 3.7.2 (no changes necessary) * Bumped debhelper compatibility up to 5 * Removed test stuff from examples; it's now verified during build -- Wesley J. Landaker Sat, 25 Aug 2007 23:54:01 -0600 ent (1.0-6) unstable; urgency=low * Compile with -Wall and -Werror * Add missing braces in multi-dimensional array initializer * Update to Policy 3.7.1.0 (no changes necessary) * Clarify packaging license in debian/copyright * More slight manpage fixes, not using txt2man anymore * Fixed up Makefile's clean target a bit * Disabled test target during build; it's unnecessary (closes: #355726) * Allow -h for command line help so we aren't confusing -- Wesley J. Landaker Wed, 3 May 2006 20:08:23 -0600 ent (1.0-5) unstable; urgency=low * Fixed package description slightly * Cleaned up debian/rules * Fixed manpage title (ENT -> ent) -- Wesley J. Landaker Tue, 14 Jun 2005 23:34:09 -0600 ent (1.0-4) unstable; urgency=low * Acknowledge QA maintainer. * Fixed hyphens in man page -- Wesley J. Landaker Fri, 18 Mar 2005 08:20:35 -0700 ent (1.0-3) unstable; urgency=medium * New maintainer (closes: 214925) * Cleaned up debian/dirs and debian/rules * Fixed entest.sh to actually work once installed * Made regression test run during build * Rewrote man page, this time based on ent.html * Removed README.Debian, as it no longer is pertinent * Urgency=medium to try to get these fixes into sarge -- Wesley J. Landaker Sun, 5 Sep 2004 09:36:50 -0600 ent (1.0-2) unstable; urgency=low * Maintainer field set to QA group. * Lintian fixes: - Upstream Author(s) in the copyright file - Removed dh_testversion from debian/rules - Standard-versions to 3.6.1 * Debhelper compatibility level updated to 4. * Project homepage added in the long description. -- Emanuele Rocca Sun, 16 Nov 2003 17:30:41 +0100 ent (1.0-1) unstable; urgency=low * Initial Release. (Closes: #116434) -- Viral Shah Fri, 26 Oct 2001 23:04:21 -0600 debian/compat0000644000000000000000000000000211763347105010373 0ustar 9 debian/watch0000644000000000000000000000013411763354213010222 0ustar # maintenance is mostly done in this package, there will be no further # upstream releases debian/ent.install0000644000000000000000000000001411763350537011351 0ustar ent usr/bin debian/patches/0000755000000000000000000000000012046444317010622 5ustar debian/patches/manpage.patch0000644000000000000000000000346411763354625013271 0ustar Index: ent/ent.1 =================================================================== --- ent.orig/ent.1 2012-06-05 11:56:49.000000000 +0200 +++ ent/ent.1 2012-06-05 12:04:03.000000000 +0200 @@ -123,12 +123,12 @@ [Knuth, pp. 64-65] for more details. .SH OPTIONS .TP --b +\-b The input is treated as a stream of bits rather than of 8-bit bytes. Statistics reported reflect the properties of the bitstream. .TP --c +\-c Print a table of the number of occurrences of each possible byte (or bit, if the \fI-b\fR option is also specified) value, and the fraction of the overall file made up by that value. @@ -136,18 +136,18 @@ shown along with their decimal byte values. In non-terse output mode, values with zero occurrences are not printed. .TP --f +\-f Fold upper case letters to lower case before computing statistics. Folding is done based on the ISO-8859-1 (Latin-1) character set, with accented letters correctly processed. .TP --t +\-t Terse mode: output is written in Comma Separated Value (CSV) format, suitable for loading into a spreadsheet and easily read by any programming language. See Terse Mode Output Format below for additional details. .TP --u +\-u Print how-to-call information. .SH FILES If no \fIfile\fR is specified, \fIent\fR obtains its input from standard input. @@ -168,7 +168,7 @@ .PP where the italicised values in the type 1 record are the numerical values for the quantities named in the type 0 column title record. If -the_ -b_ option is specified, the second field of the type 0 record will +the_ \-b_ option is specified, the second field of the type 0 record will be "File-bits", and the file_length field in type 1 record will be given in bits instead of bytes. If the \fI-c\fR option is specified, additional records are appended to the terse mode output which contain debian/patches/series0000644000000000000000000000006012046436375012040 0ustar randtest.patch Makefile.patch totalcount.patch debian/patches/randtest.patch0000644000000000000000000000163411763361511013472 0ustar Desription: Remove private definition of log2() function use the function provided by the C library library instead Bug-Debian: http://bugs/debian.org/552835 Author: Jakub Wilk --- ent-1.1debian.orig/randtest.c +++ ent-1.1debian/randtest.c @@ -7,26 +7,18 @@ */ +#define _ISOC99_SOURCE #include #define FALSE 0 #define TRUE 1 -#define log2of10 3.32192809488736234787 - static int binary = FALSE; /* Treat input as a bitstream */ static long ccount[256], /* Bins to count occurrences of values */ totalc = 0; /* Total bytes counted */ static double prob[256]; /* Probabilities per bin for entropy */ -/* LOG2 -- Calculate log to the base 2 */ - -static double log2(double x) -{ - return log2of10 * log10(x); -} - #define MONTEN 6 /* Bytes used as Monte Carlo co-ordinates. This should be no more bits than the mantissa of your debian/patches/totalcount.patch0000644000000000000000000000675012046444317014047 0ustar Desription: change type of count of bytes from 'long' to 'unsigned long long' According to bug #692214 there is an overflow when trying to process 10000000000 (>2.147.483.647) bytes. The error occurs after about 30min. As there is a type 'unsigned long long' in C99 now, I use this type to lengthen the time before the overflow will be reached. The affected computer should reach it after 50000days now. I am open for other suggestions. Author: Thorsten Alteholz Index: ent/ent.c =================================================================== --- ent.orig/ent.c 2012-11-07 10:26:13.000000000 +0100 +++ ent/ent.c 2012-11-07 10:30:40.000000000 +0100 @@ -119,8 +119,8 @@ int main(int argc, char *argv[]) { int i, oc, opt; - long ccount[256]; /* Bins to count occurrences of values */ - long totalc = 0; /* Total character count */ + unsigned long long ccount[256];/* Bins to count occurrences of values */ + unsigned long long totalc = 0; /* Total character count */ char *samp; double a, montepi, chip, scc, ent, mean, chisq; @@ -206,7 +210,7 @@ if (terse) { V printf("0,File-%ss,Entropy,Chi-square,Mean,Monte-Carlo-Pi,Serial-Correlation\n", binary ? "bit" : "byte"); - V printf("1,%ld,%f,%f,%f,%f,%f\n", + V printf("1,%lld,%f,%f,%f,%f,%f\n", totalc, ent, chisq, mean, montepi, scc); } @@ -232,11 +236,11 @@ } for (i = 0; i < (binary ? 2 : 256); i++) { if (terse) { - V printf("3,%d,%ld,%f\n", i, + V printf("3,%d,%lld,%f\n", i, ccount[i], ((double) ccount[i] / totalc)); } else { if (ccount[i] > 0) { - V printf("%3d %c %10ld %f\n", i, + V printf("%3d %c %10lld %f\n", i, /* The following expression shows ISO 8859-1 Latin1 characters and blanks out other codes. The test for ISO space replaces the ISO @@ -251,7 +255,7 @@ } } if (!terse) { - V printf("\nTotal: %10ld %f\n\n", totalc, 1.0); + V printf("\nTotal: %10lld %f\n\n", totalc, 1.0); } } @@ -260,11 +264,11 @@ if (!terse) { V printf("Entropy = %f bits per %s.\n", ent, samp); V printf("\nOptimum compression would reduce the size\n"); - V printf("of this %ld %s file by %d percent.\n\n", totalc, samp, + V printf("of this %lld %s file by %d percent.\n\n", totalc, samp, (short) ((100 * ((binary ? 1 : 8) - ent) / (binary ? 1.0 : 8.0)))); V printf( - "Chi square distribution for %ld samples is %1.2f, and randomly\n", + "Chi square distribution for %lld samples is %1.2f, and randomly\n", totalc, chisq); V printf("would exceed this value %1.2f percent of the times.\n\n", chip * 100); Index: ent/randtest.c =================================================================== --- ent.orig/randtest.c 2012-11-07 10:30:40.000000000 +0100 +++ ent/randtest.c 2012-11-07 10:31:58.000000000 +0100 @@ -15,8 +15,8 @@ static int binary = FALSE; /* Treat input as a bitstream */ -static long ccount[256], /* Bins to count occurrences of values */ - totalc = 0; /* Total bytes counted */ +static unsigned long long ccount[256],/* Bins to count occurrences of values */ + totalc = 0; /* Total bytes counted */ static double prob[256]; /* Probabilities per bin for entropy */ #define MONTEN 6 /* Bytes used as Monte Carlo debian/patches/Makefile.patch0000644000000000000000000000156411763367134013374 0ustar Desription: docbook2x-man does not create output that lintian is delighted by Author: Thorsten Alteholz Index: ent/Makefile =================================================================== --- ent.orig/Makefile 2012-06-05 13:30:52.000000000 +0200 +++ ent/Makefile 2012-06-05 13:32:42.000000000 +0200 @@ -4,7 +4,7 @@ all: ent ent.1 ent: ent.o iso8859.o randtest.o - $(CC) $(CFLAGS) ent.o iso8859.o randtest.o -o ent -lm + $(CC) $(CFLAGS) $(LDFLAGS) ent.o iso8859.o randtest.o -o ent -lm ent.c: iso8859.h randtest.h @@ -28,4 +28,11 @@ %.1: %.1.txt asciidoc -b docbook -d manpage $< docbook2x-man $*.1.xml - rm -f $*.1.xml + mv $*.1 $*.1.pre + cat $*.1.pre | sed "s/-b /\\\\-b/" | \ + sed "s/-c /\\\\-c/" | \ + sed "s/-f /\\\\-f/" | \ + sed "s/-t /\\\\-t/" | \ + sed "s/-u /\\\\-u/" | \ + sed "s/ -b/ \\\\-b/" > $*.1 + rm -f $*.1.xml $*.1.pre debian/rules0000755000000000000000000000024311763366610010256 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) %: dh $@ debian/source/0000755000000000000000000000000011763353346010501 5ustar debian/source/format0000644000000000000000000000001411763353346011707 0ustar 3.0 (quilt)