rpms/audio-entropyd/F-8 audio-entropyd-1.0.1-xtra_debug.patch, NONE, 1.1 audio-entropyd.spec, 1.6, 1.7 sources, 1.2, 1.3
Tom Callaway (spot)
fedora-extras-commits at redhat.com
Thu Aug 7 19:17:16 UTC 2008
Author: spot
Update of /cvs/pkgs/rpms/audio-entropyd/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24390/F-8
Modified Files:
audio-entropyd.spec sources
Added Files:
audio-entropyd-1.0.1-xtra_debug.patch
Log Message:
add xtra_debug patch to silence log filling noise by default
audio-entropyd-1.0.1-xtra_debug.patch:
--- NEW FILE audio-entropyd-1.0.1-xtra_debug.patch ---
diff -up audio-entropyd-1.0.1/audio-entropyd.c.BAD audio-entropyd-1.0.1/audio-entropyd.c
--- audio-entropyd-1.0.1/audio-entropyd.c.BAD 2008-08-07 14:58:09.000000000 -0400
+++ audio-entropyd-1.0.1/audio-entropyd.c 2008-08-07 15:08:39.000000000 -0400
@@ -110,6 +110,7 @@
int loggingstate = 1;
int treshold = 0;
char skip_test = 0;
+int xtra_debug = 0;
#define max(x, y) ((x)>(y)?(x):(y))
@@ -139,6 +140,7 @@ int main(int argc, char **argv)
{"dsp-device", 1, NULL, 'd'},
{"sample-rate", 1, NULL, 'N'},
{"skip-test", 0, NULL, 's' },
+ {"xtra-debug", 0, NULL, 'x' },
{"help", 0, NULL, 'h'},
{NULL, 0, NULL, 0}
};
@@ -146,7 +148,7 @@ int main(int argc, char **argv)
/* Process commandline options */
while(1)
{
- c = getopt_long (argc, argv, "sr:d:w:N:Kh", long_options, NULL);
+ c = getopt_long (argc, argv, "sr:d:w:N:Kxh", long_options, NULL);
if (c == -1)
break;
@@ -164,6 +166,9 @@ int main(int argc, char **argv)
case 'N':
sample_rate = atoi(optarg);
break;
+ case 'x':
+ xtra_debug = 1;
+ break;
case '?':
case 'h':
usage();
@@ -461,6 +466,7 @@ void usage(void)
fprintf(stderr, "--read-size, -r [] Number of bytes to read at a time. (Default %i)\n", DEFAULT_INPUT_BUFFER_SIZE);
fprintf(stderr, "--dsp-device, -d [] Specify sound device to use. (Default %s)\n", DEFAULT_DSP_DEV);
fprintf(stderr, "--sample-rate, -N [] Audio sampling rate. (default %i)\n", DEFAULT_SAMPLE_RATE);
+ fprintf(stderr, "--xtra-debug, -x Extra-debugging (Default disabled)\n");
fprintf(stderr, "\n");
}
diff -up audio-entropyd-1.0.1/RNGTEST.c.BAD audio-entropyd-1.0.1/RNGTEST.c
--- audio-entropyd-1.0.1/RNGTEST.c.BAD 2008-08-07 15:02:10.000000000 -0400
+++ audio-entropyd-1.0.1/RNGTEST.c 2008-08-07 15:06:20.000000000 -0400
@@ -29,7 +29,7 @@
#include <string.h>
#include <unistd.h>
#include <syslog.h>
-
+#include "RNGTEST.h"
/* array with numberofbitssetto1 */
char RNGTEST_bit1cnt[256];
@@ -130,7 +130,9 @@ char RNGTEST_shorttest(void)
/* 140-2 */
if (RNGTEST_n1<=9725 || RNGTEST_n1 >= 10275) /* passwd if 9725 < n1 < 10275 */
{
- syslog(LOG_CRIT, "Monobit test failed! [%d]\n", RNGTEST_n1);
+ if (xtra_debug) {
+ syslog(LOG_CRIT, "Monobit test failed! [%d]\n", RNGTEST_n1);
+ }
return -1;
}
@@ -150,7 +152,9 @@ char RNGTEST_shorttest(void)
/* 140-2 */
if ((X<=2.16) || (X>=46.17))
{
- syslog(LOG_CRIT, "Poker test failed! [%f]\n", X);
+ if (xtra_debug) {
+ syslog(LOG_CRIT, "Poker test failed! [%f]\n", X);
+ }
return -1;
}
@@ -214,7 +218,9 @@ char RNGTEST_longtest(void)
#endif
if (runlength >= 26) /* 140-2 */
{
- syslog(LOG_CRIT, "Long-run failed! [%d]", runlength);
+ if (xtra_debug) {
+ syslog(LOG_CRIT, "Long-run failed! [%d]", runlength);
+ }
return -1;
}
}
@@ -266,8 +272,9 @@ char RNGTEST_longtest(void)
nok |= !RNGTEST_checkinterval(6, 111, 201);
if (nok)
{
- syslog(LOG_CRIT, "Runs-test failed!\n");
-
+ if (xtra_debug) {
+ syslog(LOG_CRIT, "Runs-test failed!\n");
+ }
return -1;
}
diff -up audio-entropyd-1.0.1/RNGTEST.h.BAD audio-entropyd-1.0.1/RNGTEST.h
--- audio-entropyd-1.0.1/RNGTEST.h.BAD 2008-08-07 15:05:14.000000000 -0400
+++ audio-entropyd-1.0.1/RNGTEST.h 2008-08-07 15:05:43.000000000 -0400
@@ -3,3 +3,4 @@ void RNGTEST_add(unsigned char newval);
char RNGTEST_shorttest(void);
char RNGTEST_longtest(void);
char RNGTEST(void);
+int xtra_debug;
Index: audio-entropyd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audio-entropyd/F-8/audio-entropyd.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- audio-entropyd.spec 23 Aug 2007 13:19:39 -0000 1.6
+++ audio-entropyd.spec 7 Aug 2008 19:16:46 -0000 1.7
@@ -1,12 +1,13 @@
Name: audio-entropyd
-Version: 1.0.0
-Release: 5%{?dist}
+Version: 1.0.1
+Release: 3%{?dist}
License: GPLv2
Group: System Environment/Daemons
Summary: Generate entropy from audio output
URL: http://www.vanheusden.com/aed/
Source0: http://www.vanheusden.com/aed/audio-entropyd-%{version}.tgz
Source1: audio-entropyd
+Patch0: audio-entropyd-1.0.1-xtra_debug.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
@@ -17,6 +18,7 @@
%prep
%setup -q
+%patch0 -p1 .b xtra_debug
%build
make OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
@@ -53,6 +55,15 @@
%{_sbindir}/audio-entropyd
%changelog
+* Thu Aug 7 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1.0.1-3
+- add xtra-debug option
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.0.1-2
+- Autorebuild for GCC 4.3
+
+* Tue Feb 19 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.0.1-1
+- update to 1.0.1
+
* Thu Aug 23 2007 Tom "spot" Callaway <tcallawa at redhat.com> 1.0.0-5
- rebuild for BuildID
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/audio-entropyd/F-8/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 5 Jun 2007 19:19:18 -0000 1.2
+++ sources 7 Aug 2008 19:16:46 -0000 1.3
@@ -1 +1 @@
-0957c4817aba487966fc711d77182576 audio-entropyd-1.0.0.tgz
+486f7d46ffc999830e550ccb07abfe61 audio-entropyd-1.0.1.tgz
More information about the fedora-extras-commits
mailing list