- haveged can be run as an application if also running as a daemon (Closes: #998382). Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
10d5974907
commit
363454abff
54 changed files with 6554 additions and 5557 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
v1.9.19 (Oct 02, 2024) [Jirka Hladky]
|
||||
* Added --time_interval N to add entropy unconditionally every N seconds
|
||||
|
||||
v1.9.18 (Apr 09, 2022) [Jirka Hladky]
|
||||
* Round bits up and target full pool size [Jason A. Donenfeld]
|
||||
* Specify right kernel commit in README [Jason A. Donenfeld]
|
||||
|
||||
v1.9.17 (Jan 08, 2022)
|
||||
* Added new verbose mode [Jirka Hladky]
|
||||
* haveged-once.service - use @SBIN_DIR@ instead of hard-coded path [Jirka Hladky]
|
||||
|
||||
v1.9.16 (Jan 02, 2022)
|
||||
* Allow newuname syscall [Jirka Hladky]
|
||||
* Fix: haveged cannot be run as an application if also running as a daemon [Günther Brunthaler]
|
||||
* Add entropy unconditionally at the start and then every 60 seconds [Jirka Hladky]
|
||||
* New parameter --once to refill entropy once and quit immediately [Jirka Hladky]
|
||||
* Added haveged-once.service to provide entropy once (intended for initramfs) [Jirka Hladky]
|
||||
|
||||
v1.9.15 (Sep 30, 2021)
|
||||
* Check for sys/auxv.h before using it. [Peter Seiderer]
|
||||
* fix build on uclibc (origin/pr/58) [Pierre-Jean Texier]
|
||||
* Improved make check tests [Jirka Hladky]
|
||||
* Removed old init.d files. Configs are under contrib directory [Jirka Hladky]
|
||||
* Support for Linux kernel LRNG patch set
|
||||
|
||||
v1.9.14 (Jan 01, 2021)
|
||||
* made enttest configurable
|
||||
* havegecmd.c - new command added to close the communication socket [Werner Fink]
|
||||
|
|
6
INSTALL
6
INSTALL
|
@ -1,8 +1,8 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -225,7 +225,7 @@ order to use an ANSI C compiler:
|
|||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX 'make' updates targets which have the same time stamps as their
|
||||
HP-UX 'make' updates targets which have the same timestamps as their
|
||||
prerequisites, which makes it generally unusable when shipped generated
|
||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# Files to be included in distribution
|
||||
EXTRA_DIST = ent/entitle.gif init.d/service.fedora init.d/service.redhat \
|
||||
init.d/sysv.lsb init.d/sysv.redhat nist/template9 \
|
||||
EXTRA_DIST = ent/entitle.gif nist/template9 \
|
||||
contrib/diags/data_prep.c contrib/diags/bins.p contrib/diags/inc.p \
|
||||
contrib/diags/lognorm.r contrib/diags/lognorm.sh \
|
||||
haveged.spec contrib/build/build.sh contrib/build/lib.spec contrib/build/nolib.spec \
|
||||
|
@ -12,7 +11,7 @@ EXTRA_DIST = ent/entitle.gif init.d/service.fedora init.d/service.redhat \
|
|||
EXTRA_PROGRAMS = ent/entest nist/nist
|
||||
|
||||
# Build install script and tests as necessary
|
||||
SUBDIRS = src init.d man ent nist
|
||||
SUBDIRS = src man ent nist
|
||||
|
||||
# check entire package
|
||||
DISTCHECK_CONFIGURE_FLAGS = "--enable-nistest"
|
||||
|
|
59
Makefile.in
59
Makefile.in
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -168,8 +168,8 @@ am__recursive_targets = \
|
|||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir distdir-am dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
|
||||
config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
|
@ -186,9 +186,6 @@ am__define_uniq_tagged_files = \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
|
||||
|
@ -236,6 +233,8 @@ am__relativize = \
|
|||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
|
@ -252,6 +251,8 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
@ -261,13 +262,13 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -347,6 +348,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -357,8 +359,7 @@ top_builddir = @top_builddir@
|
|||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Files to be included in distribution
|
||||
EXTRA_DIST = ent/entitle.gif init.d/service.fedora init.d/service.redhat \
|
||||
init.d/sysv.lsb init.d/sysv.redhat nist/template9 \
|
||||
EXTRA_DIST = ent/entitle.gif nist/template9 \
|
||||
contrib/diags/data_prep.c contrib/diags/bins.p contrib/diags/inc.p \
|
||||
contrib/diags/lognorm.r contrib/diags/lognorm.sh \
|
||||
haveged.spec contrib/build/build.sh contrib/build/lib.spec contrib/build/nolib.spec \
|
||||
|
@ -366,7 +367,7 @@ EXTRA_DIST = ent/entitle.gif init.d/service.fedora init.d/service.redhat \
|
|||
|
||||
|
||||
# Build install script and tests as necessary
|
||||
SUBDIRS = src init.d man ent nist
|
||||
SUBDIRS = src man ent nist
|
||||
|
||||
# check entire package
|
||||
DISTCHECK_CONFIGURE_FLAGS = "--enable-nistest"
|
||||
|
@ -573,7 +574,6 @@ cscopelist-am: $(am__tagged_files)
|
|||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
@ -657,6 +657,10 @@ dist-xz: distdir
|
|||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zstd: distdir
|
||||
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
|
@ -699,6 +703,8 @@ distcheck: dist
|
|||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
|
@ -714,7 +720,7 @@ distcheck: dist
|
|||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
|
@ -879,18 +885,19 @@ uninstall-am:
|
|||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
|
||||
dist-xz dist-zip dist-zstd distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
|
2
NEWS
2
NEWS
|
@ -1,3 +1,5 @@
|
|||
Please see ChangeLog for the latest NEWS.
|
||||
|
||||
v1.9.8 (Sep 30, 2019)
|
||||
* Various bug fixes - please see ChangeLog for the detailed list of changes
|
||||
|
||||
|
|
57
README
57
README
|
@ -136,12 +136,10 @@ The following build options are available to "./configure":
|
|||
1. --enable-clock_gettime (default 'no' for recognized hosts)
|
||||
2. --enable-daemon (default 'yes' if Linux)
|
||||
3. --enable-diagnostic (default 'no')
|
||||
4. --enable-init (type, default 'no')
|
||||
5. --enable-initdir (default '' unless enable--init="service.*")
|
||||
6. --enable-nistest (default 'no' but recommended)
|
||||
7. --enable-olt (default 'yes')
|
||||
8. --enable-threads (experimental)
|
||||
9. --enable-tune (default 'yes')
|
||||
4. --enable-nistest (default 'no' but recommended)
|
||||
5. --enable-olt (default 'yes')
|
||||
6. --enable-threads (experimental)
|
||||
7. --enable-tune (default 'yes')
|
||||
|
||||
Detailed option information is available by typing "./configure --help". For
|
||||
options xxx that take "yes/no" arguments, --disable-xxx may be used as the
|
||||
|
@ -170,15 +168,6 @@ are enabled. The capture or inject diagnostic may be enabled singly by setting
|
|||
the option to 'capture' or 'inject'. A setting for any value other than 'no'
|
||||
for this option forces --enable-daemon=no. See DIAGNOSTICS below for details.
|
||||
|
||||
The --enable-init option is active only when --enable-daemon is 'yes'. This
|
||||
value can specify a template to be used in the installation of an init method
|
||||
by the build's install target. The default value, 'no', disables the feature.
|
||||
Other values can be used to install a traditional systemv init script or
|
||||
systemd unit definition. See INSTALLATION for details.
|
||||
|
||||
The --enable-initdir is active only when --enable-init='service.*', i.e. a
|
||||
systemd install. See INSTALLATION for details.
|
||||
|
||||
The --enable-nistest option enables more thorough testing for the check target.
|
||||
See CHECKING for details.
|
||||
|
||||
|
@ -256,7 +245,7 @@ the haveged collection area to exercise all buffer logic.
|
|||
|
||||
Users are encouraged to run their own external tests. The --number==0 option is
|
||||
a convenient means to pipe haveged output into external suites such as Dieharder,
|
||||
the TESTU01 batteries, or PractRand.
|
||||
the TESTU01 batteries, or PractRand.
|
||||
|
||||
|
||||
RUNNING haveged
|
||||
|
@ -333,7 +322,7 @@ where
|
|||
|
||||
build option flags represent the ./configure options as:
|
||||
C=clock_gettime, D=diagnostic I=tune with cpuid, M=multi-core, T=online tests, V=tune with vfs
|
||||
|
||||
|
||||
tuning sources are:
|
||||
D=default value, P=instance parameter, C=cpuid present,
|
||||
H=hyperthreading, A=AMD cpuid, A5=AMD fn5, A6=AMD fn6, A8=AMD fn8
|
||||
|
@ -369,7 +358,7 @@ where
|
|||
<action> is either 'retry' or 'fail'
|
||||
<bytes> is number of bytes processed in procedure before failure
|
||||
<fill> is the number of times the buffer was filled
|
||||
|
||||
|
||||
The exec summary is logged upon error or signal terminations. Other log output is
|
||||
controlled by --verbose:
|
||||
|
||||
|
@ -423,38 +412,6 @@ automake's bin_PROGRAMS directory and provides a man(8) page. A man(3) page
|
|||
is provided for the libtool build. If the daemon interface is enabled, the
|
||||
executable is installed in automake's sbin_PROGRAMS directory.
|
||||
|
||||
If the daemon interface is enabled, the --enable-init setting provides a simple
|
||||
template system to setup the init method. If --enable-init is set to none
|
||||
no action is taken. Otherwise, the template must reside in the init.d build
|
||||
directory and is selected by the setting. Template names "service.*" indicate
|
||||
that a systemd style init, while template names "sysv.*" are used for sysv
|
||||
style init scripts.
|
||||
|
||||
Sample sysv style templates are provided for linux standard base, sysv.lsb,
|
||||
and redhat systems, sysv.redhat , such as centos which have not moved to
|
||||
systemd style inits.
|
||||
|
||||
For systemd style installs, --enable-initdir specifies the systemd unit
|
||||
directory. If the setting is not specified (or is ''), the default value is
|
||||
obtained from hosts pkg-config query for systemdsystemunitdir. Sample systemd
|
||||
templates are provided for forking, service.forking, and non-forking,
|
||||
service.fedora, configurations. The non-forking configuration is recommended to
|
||||
avoid the overhead of PID file and minimize start-up cost.
|
||||
|
||||
Examples:
|
||||
|
||||
./configure --enable-init=service.redhat
|
||||
./configure --enable-init=sysv.lsb
|
||||
|
||||
Custom init scripts can be added as necessary by adding templates to the
|
||||
init.d directory.
|
||||
|
||||
A sample file, haveged.spec, is provided in the build root as a guide for
|
||||
those who want to build a rpm. As with init scripts, the sample may need
|
||||
customization before use. Other SPEC file examples can be found in the
|
||||
contrib directory (see EXTRAS for details).
|
||||
|
||||
|
||||
EXTRAS
|
||||
|
||||
The contrib directory contains bits and pieces that are not integrated into the
|
||||
|
|
77
README.md
77
README.md
|
@ -2,6 +2,22 @@
|
|||
|
||||
Haveged, an entropy source
|
||||
|
||||
IMPORTANT UPDATE
|
||||
|
||||
Starting from Linux kernel v5.4, the HAVEGED inspired algorithm has been included in the Linux kernel (see the [LKML article]( https://lore.kernel.org/lkml/alpine.DEB.2.21.1909290010500.2636@nanos.tec.linutronix.de/T/) and the Linux Kernel [commit](https://github.com/torvalds/linux/commit/50ee7529ec4500c88f8664560770a7a1b65db72b)). Additionally, since v5.6, as soon as the CRNG (the Linux cryptographic-strength random number generator) gets ready, `/dev/random` does not block on reads anymore (see [this commit](https://github.com/torvalds/linux/commit/30c08efec8884fb106b8e57094baa51bb4c44e32)).
|
||||
|
||||
I'm happy that these changes made it into the mainline kernel. It's pleasing to see that the main idea behind HAVEGED has sustained time test - it was published already in 2003 [here.](https://www.irisa.fr/caps/projects/hipsor/publications/havege-tomacs.pdf) I'm also glad that the HAVEGE algorithm is being further explored and examined - see the [CPU Jitter Random Number Generator.](https://www.chronox.de/jent.html)
|
||||
|
||||
Please note that while the mainline Linux Kernel and HAVEGED are using the same concept to generate the entropy (utilizing the CPU jitter) the implementation is completely different. In this sense, HAVEGED can be viewed as another entropy source.
|
||||
|
||||
It means that HAVEGED **service** is now less relevant. However, it's still useful in the following situations, when you
|
||||
* need randomness early in the boot process, before the CRNG in the Linux kernel gets fully initialized.
|
||||
* want to deploy an additional entropy source. HAVEGED now inserts entropy into the kernel every 60 seconds, regardless of the entropy level reported by Linux Kernel. It does not affect the `/dev/random` read speed but it diversifies the entropy sources, making the Linux Kernel CRNG more robust.
|
||||
* you are looking for userspace RNG to generate random numbers. See `man -S8 haveged` for examples or try running `haveged -n 0 | pv > /dev/null`
|
||||
* and last but not least, most Linux installations are still running on the older kernel versions.
|
||||
|
||||
In any case, I will keep maintaining the HAVEGED project. The userspace application, as well as the haveged library, are not affected in any way by changes in the Linux kernel.
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
Complete documentation on haveged can be found at http://www.issihosts.com/haveged/
|
||||
|
@ -137,12 +153,10 @@ The following build options are available to "./configure":
|
|||
1. --enable-clock_gettime (default 'no' for recognized hosts)
|
||||
2. --enable-daemon (default 'yes' if Linux)
|
||||
3. --enable-diagnostic (default 'no')
|
||||
4. --enable-init (type, default 'no')
|
||||
5. --enable-initdir (default '' unless enable--init="service.*")
|
||||
6. --enable-nistest (default 'no' but recommended)
|
||||
7. --enable-olt (default 'yes')
|
||||
8. --enable-threads (experimental)
|
||||
9. --enable-tune (default 'yes')
|
||||
4. --enable-nistest (default 'no' but recommended)
|
||||
5. --enable-olt (default 'yes')
|
||||
6. --enable-threads (experimental)
|
||||
7. --enable-tune (default 'yes')
|
||||
|
||||
Detailed option information is available by typing "./configure --help". For
|
||||
options xxx that take "yes/no" arguments, --disable-xxx may be used as the
|
||||
|
@ -171,15 +185,6 @@ are enabled. The capture or inject diagnostic may be enabled singly by setting
|
|||
the option to 'capture' or 'inject'. A setting for any value other than 'no'
|
||||
for this option forces --enable-daemon=no. See DIAGNOSTICS below for details.
|
||||
|
||||
The --enable-init option is active only when --enable-daemon is 'yes'. This
|
||||
value can specify a template to be used in the installation of an init method
|
||||
by the build's install target. The default value, 'no', disables the feature.
|
||||
Other values can be used to install a traditional systemv init script or
|
||||
systemd unit definition. See INSTALLATION for details.
|
||||
|
||||
The --enable-initdir is active only when --enable-init='service.*', i.e. a
|
||||
systemd install. See INSTALLATION for details.
|
||||
|
||||
The --enable-nistest option enables more thorough testing for the check target.
|
||||
See CHECKING for details.
|
||||
|
||||
|
@ -238,9 +243,9 @@ The build check target provides two test procedures for the build.
|
|||
NIST to review the detailed results. AIS31 provides recommendations for the
|
||||
NIST test suite as 'additional tests'. See testing documentation at
|
||||
http://www.issihosts.com/haveged/ais31.html for further information.
|
||||
|
||||
|
||||
The "quick" test is always part of the check target. The NIST suite is run only
|
||||
when --enable-nistest is 'yes'.
|
||||
when --enable-nistest is 'yes'.
|
||||
|
||||
Both checks function the same way, haveged is run to collect a sample file in
|
||||
the test directory which is then analyzed by the test program. A pass-fail return
|
||||
|
@ -257,7 +262,7 @@ the haveged collection area to exercise all buffer logic.
|
|||
|
||||
Users are encouraged to run their own external tests. The --number==0 option is
|
||||
a convenient means to pipe haveged output into external suites such as Dieharder,
|
||||
the TESTU01 batteries, or PractRand.
|
||||
the TESTU01 batteries, or PractRand.
|
||||
|
||||
|
||||
RUNNING haveged
|
||||
|
@ -334,7 +339,7 @@ where
|
|||
|
||||
build option flags represent the ./configure options as:
|
||||
C=clock_gettime, D=diagnostic I=tune with cpuid, M=multi-core, T=online tests, V=tune with vfs
|
||||
|
||||
|
||||
tuning sources are:
|
||||
D=default value, P=instance parameter, C=cpuid present,
|
||||
H=hyperthreading, A=AMD cpuid, A5=AMD fn5, A6=AMD fn6, A8=AMD fn8
|
||||
|
@ -370,7 +375,7 @@ where
|
|||
<action> is either 'retry' or 'fail'
|
||||
<bytes> is number of bytes processed in procedure before failure
|
||||
<fill> is the number of times the buffer was filled
|
||||
|
||||
|
||||
The exec summary is logged upon error or signal terminations. Other log output is
|
||||
controlled by --verbose:
|
||||
|
||||
|
@ -424,38 +429,6 @@ automake's bin_PROGRAMS directory and provides a man(8) page. A man(3) page
|
|||
is provided for the libtool build. If the daemon interface is enabled, the
|
||||
executable is installed in automake's sbin_PROGRAMS directory.
|
||||
|
||||
If the daemon interface is enabled, the --enable-init setting provides a simple
|
||||
template system to setup the init method. If --enable-init is set to none
|
||||
no action is taken. Otherwise, the template must reside in the init.d build
|
||||
directory and is selected by the setting. Template names "service.*" indicate
|
||||
that a systemd style init, while template names "sysv.*" are used for sysv
|
||||
style init scripts.
|
||||
|
||||
Sample sysv style templates are provided for linux standard base, sysv.lsb,
|
||||
and redhat systems, sysv.redhat , such as centos which have not moved to
|
||||
systemd style inits.
|
||||
|
||||
For systemd style installs, --enable-initdir specifies the systemd unit
|
||||
directory. If the setting is not specified (or is ''), the default value is
|
||||
obtained from hosts pkg-config query for systemdsystemunitdir. Sample systemd
|
||||
templates are provided for forking, service.forking, and non-forking,
|
||||
service.fedora, configurations. The non-forking configuration is recommended to
|
||||
avoid the overhead of PID file and minimize start-up cost.
|
||||
|
||||
Examples:
|
||||
|
||||
./configure --enable-init=service.redhat
|
||||
./configure --enable-init=sysv.lsb
|
||||
|
||||
Custom init scripts can be added as necessary by adding templates to the
|
||||
init.d directory.
|
||||
|
||||
A sample file, haveged.spec, is provided in the build root as a guide for
|
||||
those who want to build a rpm. As with init scripts, the sample may need
|
||||
customization before use. Other SPEC file examples can be found in the
|
||||
contrib directory (see EXTRAS for details).
|
||||
|
||||
|
||||
EXTRAS
|
||||
|
||||
The contrib directory contains bits and pieces that are not integrated into the
|
||||
|
|
319
aclocal.m4
vendored
319
aclocal.m4
vendored
|
@ -1,6 +1,6 @@
|
|||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -14,15 +14,16 @@
|
|||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
[m4_warning([this file was generated for autoconf 2.69.
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
|
||||
[m4_warning([this file was generated for autoconf 2.71.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -53,7 +54,7 @@ m4_define([_LT_COPYING], [dnl
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
])
|
||||
|
||||
# serial 58 LT_INIT
|
||||
# serial 59 LT_INIT
|
||||
|
||||
|
||||
# LT_PREREQ(VERSION)
|
||||
|
@ -203,6 +204,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
|||
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
|
||||
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
|
||||
m4_require([_LT_CMD_RELOAD])dnl
|
||||
m4_require([_LT_DECL_FILECMD])dnl
|
||||
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
|
||||
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
|
||||
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
|
||||
|
@ -241,8 +243,8 @@ esac
|
|||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
|
@ -794,7 +796,7 @@ _LT_EOF
|
|||
# if finds mixed CR/LF and LF-only lines. Since sed operates in
|
||||
# text mode, it properly converts lines to CR/LF. This bash problem
|
||||
# is reportedly fixed, but why not run on old versions too?
|
||||
sed '$q' "$ltmain" >> "$cfgfile" \
|
||||
$SED '$q' "$ltmain" >> "$cfgfile" \
|
||||
|| (rm -f "$cfgfile"; exit 1)
|
||||
|
||||
mv -f "$cfgfile" "$ofile" ||
|
||||
|
@ -1056,8 +1058,8 @@ int forced_loaded() { return 2;}
|
|||
_LT_EOF
|
||||
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
|
||||
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
|
||||
cat > conftest.c << _LT_EOF
|
||||
|
@ -1081,17 +1083,12 @@ _LT_EOF
|
|||
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*) # darwin 5.x on
|
||||
# if running on 10.5 or later, the deployment target defaults
|
||||
# to the OS version, if on x86, and 10.4, the deployment
|
||||
# target defaults to 10.4. Don't you love it?
|
||||
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
|
||||
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
10.[[012]][[,.]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
10.*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
darwin*)
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -1140,12 +1137,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
|||
output_verbose_link_cmd=func_echo_all
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
m4_if([$1], [CXX],
|
||||
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
fi
|
||||
],[])
|
||||
else
|
||||
|
@ -1259,7 +1256,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
|
|||
# _LT_WITH_SYSROOT
|
||||
# ----------------
|
||||
AC_DEFUN([_LT_WITH_SYSROOT],
|
||||
[AC_MSG_CHECKING([for sysroot])
|
||||
[m4_require([_LT_DECL_SED])dnl
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_ARG_WITH([sysroot],
|
||||
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
|
||||
[Search for dependent libraries within DIR (or the compiler's sysroot
|
||||
|
@ -1276,7 +1274,7 @@ case $with_sysroot in #(
|
|||
fi
|
||||
;; #(
|
||||
/*)
|
||||
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
||||
lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
|
||||
;; #(
|
||||
no|'')
|
||||
;; #(
|
||||
|
@ -1306,7 +1304,7 @@ ia64-*-hpux*)
|
|||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*ELF-32*)
|
||||
HPUX_IA64_MODE=32
|
||||
;;
|
||||
|
@ -1323,7 +1321,7 @@ ia64-*-hpux*)
|
|||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
if test yes = "$lt_cv_prog_gnu_ld"; then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -melf32bsmip"
|
||||
;;
|
||||
|
@ -1335,7 +1333,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
esac
|
||||
else
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
|
@ -1357,7 +1355,7 @@ mips64*-*linux*)
|
|||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
emul=elf
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
emul="${emul}32"
|
||||
;;
|
||||
|
@ -1365,7 +1363,7 @@ mips64*-*linux*)
|
|||
emul="${emul}64"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*MSB*)
|
||||
emul="${emul}btsmip"
|
||||
;;
|
||||
|
@ -1373,7 +1371,7 @@ mips64*-*linux*)
|
|||
emul="${emul}ltsmip"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*N32*)
|
||||
emul="${emul}n32"
|
||||
;;
|
||||
|
@ -1393,14 +1391,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
# not appear in the list.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*32-bit*)
|
||||
case $host in
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
|
@ -1468,7 +1466,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*)
|
||||
|
@ -1507,9 +1505,22 @@ need_locks=$enable_libtool_lock
|
|||
m4_defun([_LT_PROG_AR],
|
||||
[AC_CHECK_TOOLS(AR, [ar], false)
|
||||
: ${AR=ar}
|
||||
: ${AR_FLAGS=cru}
|
||||
_LT_DECL([], [AR], [1], [The archiver])
|
||||
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
||||
|
||||
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
|
||||
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
|
||||
# higher priority because thats what people were doing historically (setting
|
||||
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
|
||||
# variable obsoleted/removed.
|
||||
|
||||
test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
|
||||
lt_ar_flags=$AR_FLAGS
|
||||
_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
|
||||
|
||||
# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
|
||||
# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
|
||||
_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
|
||||
[Flags to create an archive])
|
||||
|
||||
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
|
||||
[lt_cv_ar_at_file=no
|
||||
|
@ -1728,7 +1739,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
|||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -1771,7 +1782,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
|||
sysv5* | sco5v6* | sysv4.2uw2*)
|
||||
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
|
||||
if test -n "$kargmax"; then
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
|
||||
else
|
||||
lt_cv_sys_max_cmd_len=32768
|
||||
fi
|
||||
|
@ -2221,26 +2232,35 @@ m4_defun([_LT_CMD_STRIPLIB],
|
|||
striplib=
|
||||
old_striplib=
|
||||
AC_MSG_CHECKING([whether stripping libraries is possible])
|
||||
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
|
||||
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
if test -z "$STRIP"; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
case $host_os in
|
||||
darwin*)
|
||||
if test -n "$STRIP"; then
|
||||
if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
case $host_os in
|
||||
darwin*)
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
striplib="$STRIP -x"
|
||||
old_striplib="$STRIP -S"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
;;
|
||||
freebsd*)
|
||||
if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
|
||||
_LT_DECL([], [striplib], [1])
|
||||
|
@ -2563,7 +2583,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
|||
case $host_os in
|
||||
cygwin*)
|
||||
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
|
||||
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
|
@ -2573,14 +2593,14 @@ m4_if([$1], [],[
|
|||
;;
|
||||
pw32*)
|
||||
# pw32 DLLs use 'pw' prefix rather than 'lib'
|
||||
library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
;;
|
||||
esac
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
@ -2599,7 +2619,7 @@ m4_if([$1], [],[
|
|||
done
|
||||
IFS=$lt_save_ifs
|
||||
# Convert to MSYS style.
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
;;
|
||||
cygwin*)
|
||||
# Convert to unix form, then to dos form, then back to unix form
|
||||
|
@ -2636,7 +2656,7 @@ m4_if([$1], [],[
|
|||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
@ -2669,7 +2689,7 @@ dgux*)
|
|||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
if test -x /usr/bin/objformat; then
|
||||
|
@ -3471,7 +3491,7 @@ beos*)
|
|||
|
||||
bsdi[[45]]*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_cmd='$FILECMD -L'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
|
@ -3505,14 +3525,14 @@ darwin* | rhapsody*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
case $host_cpu in
|
||||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# Let's accept both of them until this is cleared up.
|
||||
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
esac
|
||||
|
@ -3526,7 +3546,7 @@ haiku*)
|
|||
;;
|
||||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
|
||||
|
@ -3573,7 +3593,7 @@ netbsd*)
|
|||
|
||||
newos6*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
||||
;;
|
||||
|
||||
|
@ -3700,13 +3720,13 @@ else
|
|||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
|
||||
*$lt_bad_file* | *'Invalid file or object type'*)
|
||||
lt_cv_path_NM="$tmp_nm -B"
|
||||
break 2
|
||||
;;
|
||||
*)
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
|
||||
*/dev/null*)
|
||||
lt_cv_path_NM="$tmp_nm -p"
|
||||
break 2
|
||||
|
@ -3732,7 +3752,7 @@ else
|
|||
# Let the user override the test.
|
||||
else
|
||||
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
|
||||
*COFF*)
|
||||
DUMPBIN="$DUMPBIN -symbols -headers"
|
||||
;;
|
||||
|
@ -3972,7 +3992,7 @@ esac
|
|||
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Gets list of data symbols to import.
|
||||
lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
# Adjust the below global symbol transforms to fixup imported variables.
|
||||
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
|
||||
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
|
||||
|
@ -3990,20 +4010,20 @@ fi
|
|||
# Transform an extracted symbol line into a proper C declaration.
|
||||
# Some systems (esp. on ia64) link data and code symbols differently,
|
||||
# so use this general approach.
|
||||
lt_cv_sys_global_symbol_to_cdecl="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
|
||||
$lt_cdecl_hook\
|
||||
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name and symbol address
|
||||
lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
|
||||
$lt_c_name_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name with lib prefix and
|
||||
# symbol address.
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
|
||||
$lt_c_name_lib_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
|
||||
|
@ -4027,7 +4047,7 @@ for ac_symprfx in "" "_"; do
|
|||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
|
@ -4045,9 +4065,9 @@ for ac_symprfx in "" "_"; do
|
|||
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
|
||||
" ' prfx=^$ac_symprfx]"
|
||||
else
|
||||
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
fi
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
pipe_works=no
|
||||
|
@ -4334,7 +4354,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD uses GNU C++
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
|
@ -4417,7 +4437,7 @@ m4_if([$1], [CXX], [
|
|||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
|
@ -4753,7 +4773,7 @@ m4_if([$1], [CXX], [
|
|||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
|
@ -4936,7 +4956,7 @@ m4_if([$1], [CXX], [
|
|||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
;;
|
||||
pw32*)
|
||||
|
@ -4944,7 +4964,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
|
@ -5001,15 +5021,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
|
@ -5061,7 +5081,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||
_LT_TAGVAR(whole_archive_flag_spec, $1)=
|
||||
fi
|
||||
supports_anon_versioning=no
|
||||
case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
|
||||
case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
|
||||
*GNU\ gold*) supports_anon_versioning=yes ;;
|
||||
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
|
||||
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
|
||||
|
@ -5173,6 +5193,7 @@ _LT_EOF
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
interix[[3-9]]*)
|
||||
|
@ -5187,7 +5208,7 @@ _LT_EOF
|
|||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
|
@ -5230,7 +5251,7 @@ _LT_EOF
|
|||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
;;
|
||||
esac
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*) # Sun C 5.9
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
|
@ -5242,7 +5263,7 @@ _LT_EOF
|
|||
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -5258,7 +5279,7 @@ _LT_EOF
|
|||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
@ -5390,7 +5411,7 @@ _LT_EOF
|
|||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
aix_use_runtimelinking=no
|
||||
|
||||
|
@ -5573,12 +5594,12 @@ _LT_EOF
|
|||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
|
@ -5619,7 +5640,7 @@ _LT_EOF
|
|||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
|
@ -5667,7 +5688,7 @@ _LT_EOF
|
|||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
|
@ -5878,6 +5899,7 @@ _LT_EOF
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
|
@ -6644,8 +6666,8 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
|
@ -6743,6 +6765,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
|
@ -6773,7 +6796,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
|
||||
# conventions
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
|
@ -6910,7 +6933,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case $cc_basename in
|
||||
|
@ -7050,13 +7073,13 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
|
||||
|
@ -8194,6 +8217,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
|
|||
AC_SUBST([DLLTOOL])
|
||||
])
|
||||
|
||||
# _LT_DECL_FILECMD
|
||||
# ----------------
|
||||
# Check for a file(cmd) program that can be used to detect file type and magic
|
||||
m4_defun([_LT_DECL_FILECMD],
|
||||
[AC_CHECK_TOOL([FILECMD], [file], [:])
|
||||
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
|
||||
])# _LD_DECL_FILECMD
|
||||
|
||||
# _LT_DECL_SED
|
||||
# ------------
|
||||
# Check for a fully-functional sed program, that truncates
|
||||
|
@ -8373,8 +8404,8 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
|
|||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -8805,7 +8836,7 @@ LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
|||
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
|
@ -8930,7 +8961,8 @@ m4_define([lt_dict_filter],
|
|||
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -8939,23 +8971,23 @@ m4_define([lt_dict_filter],
|
|||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# serial 4245 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.7])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.7])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
[macro_version='2.4.7'
|
||||
macro_revision='2.4.7'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -9052,7 +9084,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
|||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
|
||||
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9067,7 +9099,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
|||
[am__api_version='1.16'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.16.1], [],
|
||||
m4_if([$1], [1.16.5], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
|
@ -9083,14 +9115,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.16.1])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.16.5])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9142,7 +9174,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
|||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9175,7 +9207,7 @@ fi])])
|
|||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9203,6 +9235,10 @@ m4_defn([AC_PROG_CC])
|
|||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.65])dnl
|
||||
m4_ifdef([_$0_ALREADY_INIT],
|
||||
[m4_fatal([$0 expanded multiple times
|
||||
]m4_defn([_$0_ALREADY_INIT]))],
|
||||
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
|
@ -9239,7 +9275,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(
|
||||
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
||||
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
|
||||
[ok:ok],,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
|
@ -9291,6 +9327,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
|||
[m4_define([AC_PROG_OBJCXX],
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||
])
|
||||
# Variables for tags utilities; see am/tags.am
|
||||
if test -z "$CTAGS"; then
|
||||
CTAGS=ctags
|
||||
fi
|
||||
AC_SUBST([CTAGS])
|
||||
if test -z "$ETAGS"; then
|
||||
ETAGS=etags
|
||||
fi
|
||||
AC_SUBST([ETAGS])
|
||||
if test -z "$CSCOPE"; then
|
||||
CSCOPE=cscope
|
||||
fi
|
||||
AC_SUBST([CSCOPE])
|
||||
|
||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||
|
@ -9372,7 +9422,7 @@ for _am_header in $config_headers :; do
|
|||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9393,7 +9443,7 @@ if test x"${install_sh+set}" != xset; then
|
|||
fi
|
||||
AC_SUBST([install_sh])])
|
||||
|
||||
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9414,7 +9464,7 @@ AC_SUBST([am__leading_dot])])
|
|||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9435,12 +9485,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
|
|||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
if test x"${MISSING+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||
*)
|
||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||
esac
|
||||
MISSING="\${SHELL} '$am_aux_dir/missing'"
|
||||
fi
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --is-lightweight"; then
|
||||
|
@ -9453,7 +9498,7 @@ fi
|
|||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9482,7 +9527,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
|||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9529,7 +9574,7 @@ AC_LANG_POP([C])])
|
|||
# For backward compatibility.
|
||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9548,7 +9593,7 @@ AC_DEFUN([AM_RUN_LOG],
|
|||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9629,7 +9674,7 @@ AC_CONFIG_COMMANDS_PRE(
|
|||
rm -f conftest.file
|
||||
])
|
||||
|
||||
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9689,7 +9734,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
|||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9717,7 +9762,7 @@ fi
|
|||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9736,7 +9781,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
109
config.h.in
109
config.h.in
|
@ -33,6 +33,9 @@
|
|||
/* Define to 1 if you have the `floor' function. */
|
||||
#undef HAVE_FLOOR
|
||||
|
||||
/* Define to 1 if you have the `getauxval' function. */
|
||||
#undef HAVE_GETAUXVAL
|
||||
|
||||
/* Define to 1 if you have the `getsockopt' function. */
|
||||
#undef HAVE_GETSOCKOPT
|
||||
|
||||
|
@ -72,12 +75,12 @@
|
|||
/* Define to 1 if you have the `listen' function. */
|
||||
#undef HAVE_LISTEN
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#undef HAVE_POW
|
||||
|
||||
|
@ -138,6 +141,9 @@
|
|||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define to 1 if you have the <sys/auxv.h> header file. */
|
||||
#undef HAVE_SYS_AUXV_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
|
@ -177,6 +183,9 @@
|
|||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define to 1 if you have the <x86intrin.h> header file. */
|
||||
#undef HAVE_X86INTRIN_H
|
||||
|
||||
|
@ -186,9 +195,6 @@
|
|||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to 1 to suppress daemon interface */
|
||||
#undef NO_DAEMON
|
||||
|
||||
/* Define to single collection thread */
|
||||
#undef NUMBER_CORES
|
||||
|
||||
|
@ -234,10 +240,13 @@
|
|||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
|
||||
macro is obsolete. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 to tune with host cpuid */
|
||||
|
@ -250,36 +259,92 @@
|
|||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on macOS. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# undef _DARWIN_C_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
/* Enable X/Open compliant socket functions that do not require linking
|
||||
with -lxnet on HP-UX 11.11. */
|
||||
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
# undef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
#endif
|
||||
/* Identify the host operating system as Minix.
|
||||
This macro does not affect the system headers' behavior.
|
||||
A future release of Autoconf may stop defining this macro. */
|
||||
#ifndef _MINIX
|
||||
# undef _MINIX
|
||||
#endif
|
||||
/* Enable general extensions on NetBSD.
|
||||
Enable NetBSD compatibility extensions on Minix. */
|
||||
#ifndef _NETBSD_SOURCE
|
||||
# undef _NETBSD_SOURCE
|
||||
#endif
|
||||
/* Enable OpenBSD compatibility extensions on NetBSD.
|
||||
Oddly enough, this does nothing on OpenBSD. */
|
||||
#ifndef _OPENBSD_SOURCE
|
||||
# undef _OPENBSD_SOURCE
|
||||
#endif
|
||||
/* Define to 1 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_SOURCE
|
||||
# undef _POSIX_SOURCE
|
||||
#endif
|
||||
/* Define to 2 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_1_SOURCE
|
||||
# undef _POSIX_1_SOURCE
|
||||
#endif
|
||||
/* Enable POSIX-compatible threading on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||
#ifndef __STDC_WANT_LIB_EXT2__
|
||||
# undef __STDC_WANT_LIB_EXT2__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
# undef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||
to make mbstate_t available. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -53,7 +53,7 @@ func_file_conv ()
|
|||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
|
@ -67,7 +67,7 @@ func_file_conv ()
|
|||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
|
|
1486
config/config.guess
vendored
1486
config/config.guess
vendored
File diff suppressed because it is too large
Load diff
739
config/config.sub
vendored
739
config/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -69,6 +69,11 @@ posix_mkdir=
|
|||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -99,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
@ -137,8 +152,13 @@ while test $# -ne 0; do
|
|||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
|
@ -255,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -301,22 +325,6 @@ do
|
|||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
|
@ -326,52 +334,49 @@ do
|
|||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p' feature.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
|
@ -382,7 +387,7 @@ do
|
|||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
|
@ -411,7 +416,7 @@ do
|
|||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
|
@ -451,7 +456,18 @@ do
|
|||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
|
@ -477,6 +493,13 @@ do
|
|||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -491,9 +514,9 @@ do
|
|||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
|
|
870
config/ltmain.sh
870
config/ltmain.sh
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
|
43
configure.ac
43
configure.ac
|
@ -3,14 +3,14 @@
|
|||
## Minimum Autoconf version
|
||||
|
||||
AC_PREREQ([2.59])
|
||||
AC_INIT([haveged],[1.9.14])
|
||||
AC_INIT([haveged],[1.9.19])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AM_INIT_AUTOMAKE([subdir-objects no-dependencies])
|
||||
AC_CONFIG_SRCDIR([src/haveged.c])
|
||||
AC_CHECK_TYPES([uint32_t, uint8_t])
|
||||
HA_LDFLAGS=""
|
||||
HA_LDFLAGS="-pthread"
|
||||
|
||||
##libtool_start##
|
||||
LT_INIT
|
||||
|
@ -49,14 +49,6 @@ elif test "x$enable_diagnostic" = "xinject"; then
|
|||
enable_daemon="no";
|
||||
fi
|
||||
|
||||
## Make init configurable
|
||||
AC_ARG_ENABLE(init,
|
||||
AS_HELP_STRING([--enable-init=[type]],[Enable service.* or sysv.* template [default=no]]),
|
||||
, enable_init="no" )
|
||||
AC_ARG_ENABLE(initdir,
|
||||
AS_HELP_STRING([--enable-initdir=DIR], [Directory for systemd service files [default=pkg-config var if init==service.*]]),
|
||||
, enable_initdir="?")
|
||||
|
||||
## Make nist self-test configurable
|
||||
AC_ARG_ENABLE(nistest,
|
||||
AS_HELP_STRING([--enable-nistest=[no/yes]],[Run NIST test suite [default=no]]),
|
||||
|
@ -81,7 +73,6 @@ AC_ARG_ENABLE(threads,
|
|||
, enable_threads="no")
|
||||
if test "x$enable_threads" = "xyes"; then
|
||||
AC_DEFINE(NUMBER_CORES, 4, [Define maxium number of collection threads])
|
||||
HA_LDFLAGS="-pthread"
|
||||
else
|
||||
AC_DEFINE(NUMBER_CORES, 1, [Define to single collection thread])
|
||||
fi
|
||||
|
@ -110,7 +101,7 @@ AC_HEADER_TIME
|
|||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([__rdtsc accept accept4 bind connect execv floor getsockopt gettimeofday listen memset pow pselect recv sched_yield select send setsockopt socket sqrt])
|
||||
AC_CHECK_FUNCS([__rdtsc accept accept4 bind connect execv floor getauxval getsockopt gettimeofday listen memset pow pselect recv sched_yield select send setsockopt socket sqrt])
|
||||
|
||||
## Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
@ -124,7 +115,9 @@ AC_CHECK_HEADERS(stdint.h)
|
|||
AC_CHECK_HEADERS(stdio.h)
|
||||
AC_CHECK_HEADERS(stdlib.h)
|
||||
AC_CHECK_HEADERS(string.h)
|
||||
AC_CHECK_HEADERS([sys/auxv.h])
|
||||
AC_CHECK_HEADERS(sys/ioctl.h)
|
||||
AC_CHECK_HEADERS(sys/auxv.h)
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
AC_CHECK_HEADERS(sys/types.h)
|
||||
AC_CHECK_HEADERS(sys/socket.h)
|
||||
|
@ -218,34 +211,9 @@ if test "x$enable_clock_gettime" = "xyes"; then
|
|||
fi
|
||||
|
||||
|
||||
## Determine init type
|
||||
|
||||
if test "$daemon_type" = "none"; then
|
||||
AC_DEFINE(NO_DAEMON, 1, [Define to 1 to suppress daemon interface])
|
||||
init_type="none"
|
||||
else
|
||||
case "$enable_init" in
|
||||
service.*)
|
||||
init_type="systemd"
|
||||
;;
|
||||
sysv.*)
|
||||
init_type="sysv"
|
||||
;;
|
||||
*)
|
||||
init_type="none"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
## Fixup install and test options
|
||||
|
||||
AC_SUBST(HA_DISTRO,$enable_init)
|
||||
AC_SUBST(HA_UNITD,$enable_initdir)
|
||||
AM_CONDITIONAL(ENABLE_BIN, test "$daemon_type" = "none")
|
||||
AM_CONDITIONAL(ENABLE_SYSV, test "$init_type" = "sysv")
|
||||
AM_CONDITIONAL(ENABLE_SYSTEMD, test "$init_type" = "systemd")
|
||||
AM_CONDITIONAL(ENABLE_SYSTEMD_LOOKUP, test "$enable_initdir" = "?")
|
||||
AM_CONDITIONAL(ENABLE_NOINIT, test "$init_type" = "none")
|
||||
AM_CONDITIONAL(ENABLE_ENT_TEST, test "$enable_enttest" = "yes")
|
||||
AM_CONDITIONAL(ENABLE_NIST_TEST, test "$enable_nistest" = "yes")
|
||||
|
||||
|
@ -256,7 +224,6 @@ AC_SUBST(HA_LDFLAGS)
|
|||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
init.d/Makefile
|
||||
ent/Makefile
|
||||
nist/Makefile])
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Start the haveged service as soon as the random device is available
|
||||
# to avoid starting other services while starved of entropy
|
||||
|
||||
ACTION=="add", KERNEL=="random" , SUBSYSTEM=="mem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="haveged.service"
|
||||
ACTION=="add", KERNEL=="random", SUBSYSTEM=="mem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="haveged.service"
|
||||
|
||||
|
|
|
@ -2,20 +2,19 @@
|
|||
Description=Entropy Daemon based on the HAVEGE algorithm
|
||||
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
|
||||
DefaultDependencies=no
|
||||
After=systemd-tmpfiles-setup-dev.service
|
||||
Before=sysinit.target shutdown.target systemd-journald.service
|
||||
|
||||
[Service]
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1 --Foreground
|
||||
Restart=always
|
||||
Type=oneshot
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1 --once --Foreground
|
||||
SuccessExitStatus=137 143
|
||||
|
||||
SecureBits=noroot-locked
|
||||
CapabilityBoundingSet=CAP_SYS_ADMIN
|
||||
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_CHROOT
|
||||
# We can *not* set PrivateTmp=true as it can cause an ordering cycle.
|
||||
PrivateTmp=false
|
||||
PrivateDevices=true
|
||||
PrivateNetwork=true
|
||||
# We can *not* set PrivateNetwork=true to allow command mode (chroot when included in initramfs)
|
||||
#PrivateNetwork=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
|
@ -30,6 +29,3 @@ SystemCallArchitectures=native
|
|||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@mount
|
||||
SystemCallErrorNumber=EPERM
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
|
@ -1,6 +1,7 @@
|
|||
[Unit]
|
||||
Description=Tell haveged about new root
|
||||
DefaultDependencies=no
|
||||
ConditionKernelVersion=<5.6
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
Before=initrd-switch-root.service
|
||||
JoinsNamespaceOf=haveged.service
|
||||
|
|
1
contrib/Fedora/haveged.conf
Normal file
1
contrib/Fedora/haveged.conf
Normal file
|
@ -0,0 +1 @@
|
|||
add_dracutmodules+=" haveged "
|
|
@ -2,11 +2,12 @@
|
|||
Description=Entropy Daemon based on the HAVEGE algorithm
|
||||
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
|
||||
DefaultDependencies=no
|
||||
ConditionKernelVersion=<5.6
|
||||
After=systemd-tmpfiles-setup-dev.service
|
||||
Before=sysinit.target shutdown.target systemd-journald.service
|
||||
|
||||
[Service]
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1 --Foreground
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1 --Foreground -v 64
|
||||
Restart=always
|
||||
SuccessExitStatus=137 143
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define dracutlibdir lib/dracut
|
||||
Summary: A Linux entropy source using the HAVEGE algorithm
|
||||
Name: haveged
|
||||
Version: 1.9.14
|
||||
Version: 1.9.17
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3+
|
||||
URL: https://github.com/jirka-h/haveged
|
||||
|
@ -11,7 +11,7 @@ Requires(preun): systemd
|
|||
Requires(postun): systemd
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: automake coreutils glibc-common systemd-units
|
||||
BuildRequires: make automake coreutils glibc-common systemd-units
|
||||
Enhances: apache2 gpg2 openssl openvpn php5 smtp_daemon systemd
|
||||
|
||||
%description
|
||||
|
@ -21,7 +21,7 @@ Haveged is a user space entropy daemon which is not dependent upon the
|
|||
standard mechanisms for harvesting randomness for the system entropy
|
||||
pool. This is important in systems with high entropy needs or limited
|
||||
user interaction (e.g. headless servers).
|
||||
|
||||
|
||||
Haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion)
|
||||
to maintain a 1M pool of random bytes used to fill /dev/random
|
||||
whenever the supply of random bits in /dev/random falls below the low
|
||||
|
@ -60,8 +60,11 @@ chmod 0644 COPYING README ChangeLog AUTHORS
|
|||
|
||||
#Install systemd service file
|
||||
sed -e 's:@SBIN_DIR@:%{_sbindir}:g' -i contrib/Fedora/*service
|
||||
sed -i '/^ConditionKernelVersion/d' contrib/Fedora/*service
|
||||
|
||||
install -Dpm 0644 contrib/Fedora/haveged.service %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -Dpm 0644 contrib/Fedora/haveged-switch-root.service %{buildroot}%{_unitdir}/%{name}-switch-root.service
|
||||
install -Dpm 0644 contrib/Fedora/haveged-once.service %{buildroot}%{_unitdir}/%{name}-once.service
|
||||
install -Dpm 0755 contrib/Fedora/haveged-dracut.module %{buildroot}/%{_prefix}/%{dracutlibdir}/modules.d/98%{name}/module-setup.sh
|
||||
install -Dpm 0644 contrib/Fedora/90-haveged.rules %{buildroot}%{_udevrulesdir}/90-%{name}.rules
|
||||
|
||||
|
@ -101,7 +104,29 @@ cp -p COPYING README ChangeLog AUTHORS contrib/build/havege_sample.c %{buildroot
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Jun 28 2020 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.14-1
|
||||
* Sat Jan 08 2022 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.17-1
|
||||
- Update to 1.9.17
|
||||
|
||||
* Mon Jan 03 2022 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.16-2
|
||||
- Fixed ExecStart in haveged-once.service
|
||||
|
||||
* Sun Jan 02 2022 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.16-1
|
||||
- Update to 1.9.16
|
||||
|
||||
* Thu Sep 30 2021 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.15-1
|
||||
- Update to 1.9.15
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.14-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.9.14-4
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.14-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sun Jan 3 2021 Jirka Hladky <hladky.jiri@gmail.com> - 1.9.14-2
|
||||
- Update to 1.9.14
|
||||
- BZ1835006 - Added dracut module
|
||||
- Start the service as soon as the random device is available with
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Start the haveged service as soon as the random device is available
|
||||
# to avoid starting other services while starved of entropy
|
||||
|
||||
ACTION=="add", KERNEL=="random" , SUBSYSTEM=="mem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="haveged.service"
|
||||
ACTION=="add", KERNEL=="random", SUBSYSTEM=="mem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="haveged.service"
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[Unit]
|
||||
Description=Tell haveged about new root
|
||||
DefaultDependencies=no
|
||||
ConditionKernelVersion=<5.6
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
Before=initrd-switch-root.service
|
||||
JoinsNamespaceOf=haveged.service
|
||||
|
|
|
@ -10,13 +10,14 @@ entest_LDADD = -lm
|
|||
|
||||
entest_SOURCES = entest.c iso8859.c randtest.c chisq.c iso8859.h randtest.h
|
||||
|
||||
CLEANFILES = sample
|
||||
CLEANFILES = sample *log
|
||||
clean-local:
|
||||
rm -rf chi_square
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
if ENABLE_ENT_TEST
|
||||
check-local:
|
||||
./entest -t ${srcdir}/entitle.gif
|
||||
../src/haveged -n 16384k -v 1 $*
|
||||
./entest -vf sample
|
||||
./test.sh
|
||||
endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -163,8 +163,6 @@ am__define_uniq_tagged_files = \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -179,6 +177,8 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
@ -188,13 +188,13 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -274,6 +274,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -285,7 +286,7 @@ top_srcdir = @top_srcdir@
|
|||
AM_CFLAGS = -Wall
|
||||
entest_LDADD = -lm
|
||||
entest_SOURCES = entest.c iso8859.c randtest.c chisq.c iso8859.h randtest.h
|
||||
CLEANFILES = sample
|
||||
CLEANFILES = sample *log
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
all: all-am
|
||||
|
||||
|
@ -406,7 +407,6 @@ cscopelist-am: $(am__tagged_files)
|
|||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
@ -481,7 +481,7 @@ maintainer-clean-generic:
|
|||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
@ -551,26 +551,27 @@ uninstall-am:
|
|||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool clean-local \
|
||||
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
clean-local:
|
||||
rm -rf chi_square
|
||||
|
||||
@ENABLE_ENT_TEST_TRUE@check-local:
|
||||
@ENABLE_ENT_TEST_TRUE@ ./entest -t ${srcdir}/entitle.gif
|
||||
@ENABLE_ENT_TEST_TRUE@ ../src/haveged -n 16384k -v 1 $*
|
||||
@ENABLE_ENT_TEST_TRUE@ ./entest -vf sample
|
||||
@ENABLE_ENT_TEST_TRUE@ ./test.sh
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
13
ent/examine_chi_square.R
Normal file
13
ent/examine_chi_square.R
Normal file
|
@ -0,0 +1,13 @@
|
|||
d <- read.table('chi.txt', header = FALSE, sep = "", dec = ".")
|
||||
summary(d)
|
||||
h <- hist(d[,1],breaks=20)
|
||||
chisq.test(h$counts)
|
||||
h$counts=h$counts/sum(h$counts)
|
||||
x11()
|
||||
plot(h, col = "gray")
|
||||
curve(100/length(h$counts)*dunif(x,0,100),add=TRUE, col="red")
|
||||
x11()
|
||||
ks.test(d[,1], "punif", 0, 100)
|
||||
plot(ecdf(d[,1]))
|
||||
curve(punif(x, 0, 100), add=TRUE, col="red")
|
||||
#locator(1)
|
15
ent/examine_chi_square.sh
Executable file
15
ent/examine_chi_square.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
#for i in $(seq -w 1000); do
|
||||
# ./entest -vf <(head -c 16M /dev/random) > "${i}_linux.log"
|
||||
#done
|
||||
|
||||
mkdir chi_square
|
||||
pushd chi_square || exit 1
|
||||
for i in $(seq -w 1000); do
|
||||
../entest -vf <(../../src/haveged -n 16384k -f -) > "${i}_haveged.log"
|
||||
done
|
||||
|
||||
grep -Poh "Chi-Square: .*\(\K[0-9.]+" ./*haveged.log > ./chi.txt
|
||||
R --vanilla <../examine_chi_square.R > examine_chi_square.summary
|
||||
popd || exit 1
|
18
ent/test.sh
Executable file
18
ent/test.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
runs=10
|
||||
for i in $(seq -w "$runs"); do
|
||||
./entest -vf <(../src/haveged -n 16384k -f -) > "${i}_entest.log"
|
||||
done
|
||||
|
||||
fails=$(grep Fail ./*_entest.log | wc -l)
|
||||
|
||||
if (( fails > 2 )); then
|
||||
echo "Total $fails in $runs"
|
||||
grep Fail ./*_entest.log
|
||||
echo "Marking the whole test as failed"
|
||||
exit 255
|
||||
else
|
||||
echo "Test passed!"
|
||||
fi
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
EXTRA_DIST = service.fedora service.forking service.redhat service.suse sysv.lsb sysv.redhat
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
CLEANFILES = haveged haveged.service
|
||||
|
||||
do_subst = sed -e 's,[@]SBIN_DIR[@],$(sbindir),g'
|
||||
src_tmpl = @HA_DISTRO@
|
||||
unit_dir = @HA_UNITD@
|
||||
|
||||
if ENABLE_NOINIT
|
||||
## user will install manually.
|
||||
install-exec-hook:
|
||||
@echo "no init script installed";
|
||||
endif
|
||||
|
||||
if ENABLE_SYSV
|
||||
## legacy init script - installation via automake defaults
|
||||
|
||||
initdir = $(sysconfdir)/init.d
|
||||
init_SCRIPTS = haveged
|
||||
|
||||
haveged: $(src_tmpl) Makefile
|
||||
$(do_subst) < $(srcdir)/$(src_tmpl) > haveged;
|
||||
|
||||
endif
|
||||
|
||||
if ENABLE_SYSTEMD
|
||||
## systemd script - lookup unitdir if not specified
|
||||
|
||||
install-exec-hook:
|
||||
$(do_subst) < $(srcdir)/$(src_tmpl) > haveged.service;
|
||||
|
||||
install-data-hook: install-exec-hook
|
||||
if ENABLE_SYSTEMD_LOOKUP
|
||||
install -p -D -m644 haveged.service $(DESTDIR)`pkg-config --variable=systemdsystemunitdir systemd`/haveged.service;
|
||||
else
|
||||
install -p -D -m644 haveged.service $(DESTDIR)$(unit_dir)/haveged.service;
|
||||
endif
|
||||
## Defer systemd call to for cross-compile case
|
||||
## systemctl enable haveged.service;
|
||||
|
||||
endif
|
|
@ -1,532 +0,0 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = init.d
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(initdir)"
|
||||
SCRIPTS = $(init_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
depcomp =
|
||||
am__maybe_remake_depfiles =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = service.fedora service.forking service.redhat service.suse sysv.lsb sysv.redhat
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = haveged haveged.service
|
||||
do_subst = sed -e 's,[@]SBIN_DIR[@],$(sbindir),g'
|
||||
src_tmpl = @HA_DISTRO@
|
||||
unit_dir = @HA_UNITD@
|
||||
@ENABLE_SYSV_TRUE@initdir = $(sysconfdir)/init.d
|
||||
@ENABLE_SYSV_TRUE@init_SCRIPTS = haveged
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps init.d/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps init.d/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-initSCRIPTS: $(init_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(init_SCRIPTS)'; test -n "$(initdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(initdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(initdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(initdir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(initdir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-initSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(init_SCRIPTS)'; test -n "$(initdir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
dir='$(DESTDIR)$(initdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(initdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
@ENABLE_NOINIT_FALSE@@ENABLE_SYSTEMD_FALSE@install-exec-hook:
|
||||
@ENABLE_SYSTEMD_FALSE@install-data-hook:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-initSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-initSCRIPTS
|
||||
|
||||
.MAKE: install-am install-data-am install-exec-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-hook install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-exec-hook install-html install-html-am \
|
||||
install-info install-info-am install-initSCRIPTS install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am uninstall-initSCRIPTS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
@ENABLE_NOINIT_TRUE@install-exec-hook:
|
||||
@ENABLE_NOINIT_TRUE@ @echo "no init script installed";
|
||||
|
||||
@ENABLE_SYSV_TRUE@haveged: $(src_tmpl) Makefile
|
||||
@ENABLE_SYSV_TRUE@ $(do_subst) < $(srcdir)/$(src_tmpl) > haveged;
|
||||
|
||||
@ENABLE_SYSTEMD_TRUE@install-exec-hook:
|
||||
@ENABLE_SYSTEMD_TRUE@ $(do_subst) < $(srcdir)/$(src_tmpl) > haveged.service;
|
||||
|
||||
@ENABLE_SYSTEMD_TRUE@install-data-hook: install-exec-hook
|
||||
@ENABLE_SYSTEMD_LOOKUP_TRUE@@ENABLE_SYSTEMD_TRUE@ install -p -D -m644 haveged.service $(DESTDIR)`pkg-config --variable=systemdsystemunitdir systemd`/haveged.service;
|
||||
@ENABLE_SYSTEMD_LOOKUP_FALSE@@ENABLE_SYSTEMD_TRUE@ install -p -D -m644 haveged.service $(DESTDIR)$(unit_dir)/haveged.service;
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Entropy Daemon based on the HAVEGE algorithm
|
||||
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/haveged.pid
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1 -p /run/haveged.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Entropy Daemon based on the HAVEGE algorithm
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/haveged.pid
|
||||
ExecStart=@SBIN_DIR@/haveged -w 1024 -v 1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
Description=Entropy Daemon based on the HAVEGE algorithm
|
||||
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
|
||||
DefaultDependencies=no
|
||||
ConditionVirtualization=!container
|
||||
#Conflicts=shutdown.target
|
||||
# Don't wait for systemd-random-seed.service, leads to deadlock with fips=1
|
||||
#After=systemd-random-seed.service
|
||||
Before=sysinit.target shutdown.target systemd-journald.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/haveged -w 1024 -v 0 -F
|
||||
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_CHROOT
|
||||
PrivateNetwork=yes
|
||||
Restart=always
|
||||
SuccessExitStatus=137 143
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
|
@ -1,75 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2011-2012 Jirka Hladky hladky_dot_jiri_at_gmail_com
|
||||
# Copyright 2011-2012 Gary Wuertz gary@issiweb.com
|
||||
#
|
||||
# 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 3 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
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# haveged: Starts the haveged entropy daemon
|
||||
#
|
||||
# chkconfig: - 75 25
|
||||
# description: havege entropy daemon
|
||||
# processname: haveged
|
||||
#
|
||||
# source function library
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
prog="haveged"
|
||||
|
||||
HAVEGED_BIN=/usr/local/sbin/haveged
|
||||
LOCKFILE=/var/lock/$prog
|
||||
RETVAL=0
|
||||
|
||||
test -x ${HAVEGED_BIN} || { echo "Cannot find haveged executable ${HAVEGED_BIN}" 1>&2 ; exit 5 ; }
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n $"Starting $prog: "
|
||||
${HAVEGED_BIN} -w 1024 -v 1 && log_success_msg || log_failure_msg
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && touch ${LOCKFILE}
|
||||
echo
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n $"Stopping $prog: "
|
||||
if [ -e /var/run/$prog.pid ]; then
|
||||
kill `cat /var/run/$prog.pid` && log_success_msg || log_failure_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && rm -f ${LOCKFILE}
|
||||
echo
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
|
||||
condrestart)
|
||||
[ -f $LOCKFILE ] && $0 restart
|
||||
;;
|
||||
|
||||
status)
|
||||
status $prog
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $prog {start|stop|status|reload|restart|condrestart}"
|
||||
esac
|
||||
exit $RETVAL
|
|
@ -1,74 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2011-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
# Copyright 2011-2012 Gary Wuertz gary@issiweb.com
|
||||
#
|
||||
# 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 3 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
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# haveged: Starts the haveged entropy daemon
|
||||
#
|
||||
# chkconfig: - 75 25
|
||||
# description: havege entropy daemon
|
||||
# processname: haveged
|
||||
#
|
||||
# source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
HAVEGED_BIN=@SBIN_DIR@/haveged
|
||||
|
||||
RETVAL=0
|
||||
prog="haveged"
|
||||
LOCKFILE=/var/lock/subsys/$prog
|
||||
|
||||
test -x ${HAVEGED_BIN} || { echo "Cannot find haveged executable ${HAVEGED_BIN}" 1>&2 ; exit 5 ; }
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n $"Starting $prog: "
|
||||
${HAVEGED_BIN} -w 1024 -v 1 && success || failure
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && touch ${LOCKFILE}
|
||||
echo
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n $"Stopping $prog: "
|
||||
if [ -e /var/run/$prog.pid ]; then
|
||||
kill `cat /var/run/$prog.pid` && success || failure
|
||||
else
|
||||
failure
|
||||
fi
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && rm -f ${LOCKFILE}
|
||||
echo
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
|
||||
condrestart)
|
||||
[ -f $LOCKFILE ] && $0 restart
|
||||
;;
|
||||
|
||||
status)
|
||||
status $prog
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $prog {start|stop|status|reload|restart|condrestart}"
|
||||
esac
|
||||
exit $RETVAL
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -165,6 +165,8 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
@ -174,13 +176,13 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -260,6 +262,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -401,7 +404,6 @@ ctags CTAGS:
|
|||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
|
|
@ -63,6 +63,9 @@ use "-" for stdout.
|
|||
-F , --Foreground
|
||||
Run daemon in foreground. Do not fork and detach.
|
||||
.TP
|
||||
-e , --once
|
||||
Provide entropy to the kernel once and quit immediatelly.
|
||||
.TP
|
||||
-i nnn, --inst=nnn
|
||||
Set instruction cache size to nnn KB. Default is 16 or as determined dynamically.
|
||||
.TP
|
||||
|
@ -115,14 +118,14 @@ Set file path for the daemon pid file. Default is "/var/run/haveged.pid",
|
|||
Set run level for daemon interface:
|
||||
|
||||
n = 0 Run as daemon - must be root. Fills /dev/random when the supply of random bits
|
||||
falls below the low water mark of the device.
|
||||
falls below the low water mark of the device.
|
||||
|
||||
n = 1 Display configuration info and terminate.
|
||||
|
||||
n > 1 Write <n> kb of output. Deprecated (use --number instead), only provided for backward
|
||||
compatibility.
|
||||
|
||||
If --number is specified, values other than 0,1 are ignored. Default is 0.
|
||||
If --number is specified, values other than 0,1 are ignored. Default is 0.
|
||||
.TP
|
||||
-v n, --verbose=n
|
||||
Set diagnostic bitmap as sum of following options:
|
||||
|
@ -139,11 +142,16 @@ Set diagnostic bitmap as sum of following options:
|
|||
|
||||
32=Show all online test completion detail
|
||||
|
||||
64=Show info on RNDADDENTROPY operation
|
||||
|
||||
Default is 0. Use -1 for all diagnostics.
|
||||
.TP
|
||||
-w nnn, --write=nnn
|
||||
Set write_wakeup_threshold of daemon interface to nnn bits. Applies only to run level 0.
|
||||
.TP
|
||||
-V, --version
|
||||
Print version information and exit
|
||||
.TP
|
||||
-?, --help
|
||||
This summary of program options.
|
||||
|
||||
|
@ -188,7 +196,7 @@ If running as a daemon, access to the following files is required
|
|||
.I /proc/sys/kernel/osrelease
|
||||
.P
|
||||
.I /proc/sys/kernel/random/poolsize
|
||||
.P
|
||||
.P
|
||||
.I /proc/sys/kernel/random/write_wakeup_threshold
|
||||
.RE
|
||||
|
||||
|
@ -313,6 +321,9 @@ haveged -n 16T -o tba8cbw -f - | pv > /dev/null
|
|||
.TP
|
||||
Generate large amounts of data (16TB). Disable continuous tests for the maximum throughput but run the online tests at the startup to make sure that generator for properly initialized:
|
||||
haveged -n 16T -o tba8c -f - | pv > /dev/null
|
||||
.TP
|
||||
Create a password equivalent to a key strength of 256 bit
|
||||
haveged -f - -n 32 2>/dev/null | base64 | tr -d =
|
||||
|
||||
.SH SEE ALSO
|
||||
.TP
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -163,8 +163,6 @@ am__define_uniq_tagged_files = \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -179,6 +177,8 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
@ -188,13 +188,13 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -274,6 +274,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -406,7 +407,6 @@ cscopelist-am: $(am__tagged_files)
|
|||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -207,8 +207,6 @@ am__define_uniq_tagged_files = \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -223,6 +221,8 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
@ -232,13 +232,13 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -318,6 +318,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -620,7 +621,6 @@ cscopelist-am: $(am__tagged_files)
|
|||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
@ -659,6 +659,8 @@ check: check-am
|
|||
all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS)
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-sbinPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
|
|
36
src/havege.c
36
src/havege.c
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
@ -114,7 +114,7 @@ H_PTR havege_create( /* RETURN: app state */
|
|||
n = 1;
|
||||
if (0 == sz)
|
||||
sz = DEFAULT_BUFSZ;
|
||||
anchor = (H_SETUP *)calloc(sizeof(H_SETUP),1);
|
||||
anchor = (H_SETUP *)calloc(1, sizeof(H_SETUP));
|
||||
if (NULL==anchor)
|
||||
return h;
|
||||
h = &anchor->info;
|
||||
|
@ -317,7 +317,7 @@ int havege_status_dump( /* RETURN: output length */
|
|||
{
|
||||
struct h_status status;
|
||||
int n = 0;
|
||||
|
||||
|
||||
if (buf != 0) {
|
||||
*buf = 0;
|
||||
len -= 1;
|
||||
|
@ -346,7 +346,7 @@ int havege_status_dump( /* RETURN: output length */
|
|||
case H_SD_TOPIC_TEST:
|
||||
{
|
||||
H_UINT m;
|
||||
|
||||
|
||||
if (strlen(status.tot_tests)>0) {
|
||||
n += snprintf(buf+n, len-n, "tot tests(%s): ", status.tot_tests);
|
||||
if ((m = status.n_tests[ H_OLT_TOT_A_P] + status.n_tests[ H_OLT_TOT_A_F])>0)
|
||||
|
@ -368,19 +368,29 @@ int havege_status_dump( /* RETURN: output length */
|
|||
case H_SD_TOPIC_SUM:
|
||||
{
|
||||
char units[] = {'T', 'G', 'M', 'K', 0};
|
||||
double factor = 1024.0 * 1024.0 * 1024.0 * 1024.0;
|
||||
double factor[2];
|
||||
factor[0] = 1024.0 * 1024.0 * 1024.0 * 1024.0;
|
||||
factor[1] = factor[0];
|
||||
double sz = ((double)hptr->n_fills * hptr->i_collectSz) * sizeof(H_UINT);
|
||||
int i;
|
||||
|
||||
for (i=0;0 != units[i];i++) {
|
||||
if (sz >= factor)
|
||||
double ent = ((double) hptr->n_entropy_bytes);
|
||||
int i[2];
|
||||
|
||||
for (i[0]=0;0 != units[i[0]];i[0]++) {
|
||||
if (sz >= factor[0])
|
||||
break;
|
||||
factor /= 1024.0;
|
||||
factor[0] /= 1024.0;
|
||||
}
|
||||
n = snprintf(buf, len, "fills: %u, generated: %.4g %c bytes",
|
||||
for (i[1]=0;0 != units[i[1]];i[1]++) {
|
||||
if (ent >= factor[1])
|
||||
break;
|
||||
factor[1] /= 1024.0;
|
||||
}
|
||||
n = snprintf(buf, len, "fills: %u, generated: %.4g %c bytes, RNDADDENTROPY: %.4g %c bytes",
|
||||
hptr->n_fills,
|
||||
sz / factor,
|
||||
units[i]
|
||||
sz / factor[0],
|
||||
units[i[0]],
|
||||
ent / factor[1],
|
||||
units[i[1]]
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
|
11
src/havege.h
11
src/havege.h
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
* header/package version as a numeric major, minor, patch triple. See havege_version()
|
||||
* below for usage.
|
||||
*/
|
||||
#define HAVEGE_PREP_VERSION "1.9.14"
|
||||
#define HAVEGE_PREP_VERSION "1.9.19"
|
||||
/**
|
||||
* Basic types
|
||||
*/
|
||||
|
@ -56,7 +56,7 @@ typedef void (*pMsg)(const char *format, ...);
|
|||
typedef int (*pRawIn)(volatile H_UINT *pData, H_UINT szData);
|
||||
/**
|
||||
* options for H_PARAMS below. Lower byte transferred from verbose settings
|
||||
* upper byte set by diagnositic run options
|
||||
* upper byte set by diagnositic run options
|
||||
*/
|
||||
#define H_VERBOSE 0x001 /* deprecated from ver 1.7 */
|
||||
#define H_DEBUG_INFO 0x001 /* Show config info, retries */
|
||||
|
@ -65,14 +65,16 @@ typedef int (*pRawIn)(volatile H_UINT *pData, H_UINT szData);
|
|||
#define H_DEBUG_LOOP 0x008 /* Show loop parameters */
|
||||
#define H_DEBUG_COMPILE 0x010 /* Show assembly info */
|
||||
#define H_DEBUG_OLT 0x020 /* Show all test info */
|
||||
#define H_RNDADDENTROPY_INFO 0x040 /* RNDADDENTROPY info */
|
||||
|
||||
#define H_DEBUG_RAW_OUT 0x100 /* diagnostic output */
|
||||
#define H_DEBUG_RAW_IN 0x200 /* diagnostic input */
|
||||
#define H_DEBUG_TEST_IN 0x400 /* input test data */
|
||||
|
||||
/**
|
||||
* Initialization parameters. Use non-zero values to override default values.
|
||||
* Notes:
|
||||
*
|
||||
*
|
||||
* 1) Correspondence between provided value and value of H_PTR members are:
|
||||
* ioSz <==> i_readSz, collectSize <==> i_collectSz, nCores <==> n_cores,
|
||||
* options <==> havege_opts
|
||||
|
@ -159,6 +161,7 @@ typedef struct h_anchor {
|
|||
H_UINT m_sz; /* size of thread ipc area (bytes) */
|
||||
H_UINT n_cores; /* number of cores */
|
||||
H_UINT n_fills; /* number of buffer fills */
|
||||
size_t n_entropy_bytes; /* total amount of entropy (byte) */
|
||||
} *H_PTR;
|
||||
/**
|
||||
* Fail/Success counters for tot and production tests.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Provide HAVEGE socket communication API
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018 Werner Fink <werner@suse.de>
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
|
@ -39,6 +39,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#ifndef HAVE_STRUCT_UCRED
|
||||
struct ucred
|
||||
|
@ -54,6 +55,7 @@ struct ucred
|
|||
int first_byte;
|
||||
int socket_fd;
|
||||
static char errmsg[1024];
|
||||
extern sem_t *sem;
|
||||
|
||||
static int new_root( /* RETURN: status */
|
||||
const char *root, /* IN: path of the new root file system */
|
||||
|
@ -95,6 +97,7 @@ static int new_root( /* RETURN: status */
|
|||
strerror(errno));
|
||||
goto err;
|
||||
}
|
||||
sem_close(sem);
|
||||
ret = execv((const char *)path, argv);
|
||||
if (ret < 0) {
|
||||
snprintf(&errmsg[0], sizeof(errmsg)-1,
|
||||
|
@ -265,8 +268,14 @@ int socket_handler( /* RETURN: closed file descriptor */
|
|||
}
|
||||
|
||||
if (magic[1] == '\002') { /* ASCII start of text: read argument provided */
|
||||
uint32_t alen;
|
||||
uint32_t alen = 0;
|
||||
|
||||
/*
|
||||
* wait for the haveged -c instance to finish writting
|
||||
* before continuing to read from the socket
|
||||
*/
|
||||
sem_wait(sem);
|
||||
sem_post(sem);
|
||||
ret = receive_uinteger(fd, &alen);
|
||||
if (ret < 0) {
|
||||
print_msg("%s: can not read from UNIX socket\n", params->daemon);
|
||||
|
@ -285,6 +294,11 @@ int socket_handler( /* RETURN: closed file descriptor */
|
|||
print_msg("%s: can not read from UNIX socket\n", params->daemon);
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* We no more need the semaphore unlink it
|
||||
* Not sure if it is the best place to unlink here
|
||||
*/
|
||||
sem_unlink(SEM_NAME);
|
||||
}
|
||||
|
||||
clen = sizeof(struct ucred);
|
||||
|
@ -444,7 +458,7 @@ int receive_uinteger( /* RETURN: status */
|
|||
int fd, /* IN: file descriptor */
|
||||
uint32_t *value) /* OUT: 32 bit unsigned integer */
|
||||
{
|
||||
uint8_t buffer[4];
|
||||
uint8_t buffer[4] = {0};
|
||||
|
||||
if (safein(fd, buffer, 4 * sizeof(uint8_t)) < 0)
|
||||
return -1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Provide HAVEGE socket communication API
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018 Werner Fink <werner@suse.de>
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
#define ASCII_ACK "\x6" /* ASCII acknowledge */
|
||||
#define ASCII_NAK "\x15" /* ASCII negative acknowledge */
|
||||
#define ASCII_STX "\x2" /* ASCII start of text */
|
||||
|
||||
|
||||
#ifndef SOCK_CLOEXEC
|
||||
#define SOCK_CLOEXEC 0
|
||||
#endif
|
||||
|
@ -49,6 +49,8 @@ extern "C" {
|
|||
#define SOCK_NONBLOCK 0
|
||||
#endif
|
||||
|
||||
#define SEM_NAME "haveged_sem"
|
||||
|
||||
/**
|
||||
* Open and listen on a UNIX socket to get command from there
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
|
150
src/haveged.c
150
src/haveged.c
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2024 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
@ -19,7 +19,9 @@
|
|||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
#if defined(HAVE_SYS_AUXV_H)
|
||||
#include <sys/auxv.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
|
@ -31,6 +33,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#ifndef NO_DAEMON
|
||||
#include <syslog.h>
|
||||
|
@ -57,7 +61,7 @@
|
|||
// {{{ VERSION_TEXT
|
||||
static const char* VERSION_TEXT =
|
||||
"haveged %s\n\n"
|
||||
"Copyright (C) 2018-2021 Jirka Hladky <hladky.jiri@gmail.com>\n"
|
||||
"Copyright (C) 2018-2024 Jirka Hladky <hladky.jiri@gmail.com>\n"
|
||||
"Copyright (C) 2009-2014 Gary Wuertz <gary@issiweb.com>\n"
|
||||
"Copyright (C) 2011-2012 BenEleventh Consulting <manolson@beneleventh.com>\n\n"
|
||||
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n"
|
||||
|
@ -76,6 +80,7 @@ static struct pparams defaults = {
|
|||
.buffersz = 0,
|
||||
.detached = 0,
|
||||
.foreground = 0,
|
||||
.once = 0,
|
||||
.d_cache = 0,
|
||||
.i_cache = 0,
|
||||
.run_level = 0,
|
||||
|
@ -89,7 +94,8 @@ static struct pparams defaults = {
|
|||
.sample_out = OUTPUT_DEFAULT,
|
||||
.verbose = 0,
|
||||
.watermark = "/proc/sys/kernel/random/write_wakeup_threshold",
|
||||
.command = 0
|
||||
.command = 0,
|
||||
.time_interval = TIME_INTERVAL
|
||||
};
|
||||
struct pparams *params = &defaults;
|
||||
|
||||
|
@ -108,7 +114,7 @@ static H_PTR handle = NULL;
|
|||
* Local prototypes
|
||||
*/
|
||||
#ifndef NO_DAEMON
|
||||
static H_UINT poolSize = 0;
|
||||
static int poolSize = 0;
|
||||
|
||||
static void daemonize(void);
|
||||
static int get_poolsize(void);
|
||||
|
@ -127,6 +133,8 @@ static void usage(int db, int nopts, struct option *long_options, const char **c
|
|||
|
||||
static sigset_t mask, omask;
|
||||
|
||||
sem_t *sem = NULL;
|
||||
|
||||
#define ATOU(a) (unsigned int)atoi(a)
|
||||
/**
|
||||
* Entry point
|
||||
|
@ -135,8 +143,10 @@ int main(int argc, char **argv)
|
|||
{
|
||||
volatile char *path = strdup(argv[0]);
|
||||
volatile char *arg0 = argv[0];
|
||||
#if defined(HAVE_SYS_AUXV_H)
|
||||
if (path[0] != '/')
|
||||
path = (char*)getauxval(AT_EXECFN);
|
||||
#endif
|
||||
static const char* cmds[] = {
|
||||
"b", "buffer", "1", SETTINGR("Buffer size [KW], default: ",COLLECT_BUFSIZE),
|
||||
"d", "data", "1", SETTINGR("Data cache size [KB], with fallback to: ", GENERIC_DCACHE ),
|
||||
|
@ -146,6 +156,7 @@ int main(int argc, char **argv)
|
|||
"i", "inst", "1", SETTINGR("Instruction cache size [KB], with fallback to: ", GENERIC_ICACHE),
|
||||
"f", "file", "1", "Sample output file, default: '" OUTPUT_DEFAULT "', '-' for stdout",
|
||||
"F", "Foreground", "0", "Run daemon in foreground",
|
||||
"e", "once", "0", "Provide entropy to the kernel once and quit immediatelly",
|
||||
"r", "run", "1", "0=daemon, 1=config info, >1=<r>KB sample",
|
||||
"n", "number", "1", "Output size in [k|m|g|t] bytes, 0 = unlimited to stdout",
|
||||
"o", "onlinetest", "1", "[t<x>][c<x>] x=[a[n][w]][b[w]] 't'ot, 'c'ontinuous, default: ta8b",
|
||||
|
@ -154,7 +165,8 @@ int main(int argc, char **argv)
|
|||
#if NUMBER_CORES>1
|
||||
"t", "threads", "1", "Number of threads",
|
||||
#endif
|
||||
"v", "verbose", "1", "Verbose mask 0=none,1=summary,2=retries,4=timing,8=loop,16=code,32=test",
|
||||
"T", "time_interval", "1", "Time interval in seconds to add entropy unconditionally. Max rate/timestep is " TOSTRING(PSELECT_TIMEOUT) " seconds. Default: " TOSTRING(TIME_INTERVAL) " seconds.",
|
||||
"v", "verbose", "1", "Verbose mask 0=none,1=summary,2=retries,4=timing,8=loop,16=code,32=test,64=RNDADDENTROPY",
|
||||
"w", "write", "1", "Set write_wakeup_threshold [bits]",
|
||||
"V", "version", "0", "Print version information and exit",
|
||||
"h", "help", "0", "This help"
|
||||
|
@ -190,7 +202,9 @@ int main(int argc, char **argv)
|
|||
params->setup |= MULTI_CORE;
|
||||
#endif
|
||||
|
||||
first_byte = arg0[0];
|
||||
#ifndef NO_COMMAND_MODE
|
||||
first_byte = arg0[0];
|
||||
#endif
|
||||
if (access("/etc/initrd-release", F_OK) >= 0) {
|
||||
arg0[0] = '@';
|
||||
path[0] = '/';
|
||||
|
@ -251,7 +265,7 @@ int main(int argc, char **argv)
|
|||
if (0 == (params->setup & MULTI_CORE))
|
||||
continue;
|
||||
break;
|
||||
case 'p': case 'w': case 'F':
|
||||
case 'p': case 'w': case 'F': case 'T':
|
||||
if (0 !=(params->setup & RUN_AS_APP))
|
||||
continue;
|
||||
break;
|
||||
|
@ -262,17 +276,27 @@ int main(int argc, char **argv)
|
|||
long_options[i].val = cmds[j][0];
|
||||
strcat(short_options,cmds[j]);
|
||||
if (long_options[i].has_arg!=0) strcat(short_options,":");
|
||||
// printf("Long option number %u\n", i);
|
||||
// printf("name\t%s\n", long_options[i].name);
|
||||
// printf("has_arg\t%d\n", long_options[i].has_arg);
|
||||
|
||||
i += 1;
|
||||
}
|
||||
memset(&long_options[i], 0, sizeof(struct option));
|
||||
|
||||
// printf("Short %s\n", short_options);
|
||||
do {
|
||||
c = getopt_long (argc, argv, short_options, long_options, NULL);
|
||||
// printf("Char %c\n", c);
|
||||
switch(c) {
|
||||
case 'F':
|
||||
params->setup |= RUN_IN_FG;
|
||||
params->foreground = 1;
|
||||
break;
|
||||
case 'e':
|
||||
params->setup |= RUN_ONCE;
|
||||
params->once = 1;
|
||||
break;
|
||||
case 'b':
|
||||
params->buffersz = ATOU(optarg) * 1024;
|
||||
if (params->buffersz<4)
|
||||
|
@ -321,6 +345,9 @@ int main(int argc, char **argv)
|
|||
if (params->ncores > NUMBER_CORES)
|
||||
error_exit("invalid thread count: %s", optarg);
|
||||
break;
|
||||
case 'T':
|
||||
params->time_interval = ATOU(optarg);
|
||||
break;
|
||||
case 'v':
|
||||
params->verbose = ATOU(optarg);
|
||||
break;
|
||||
|
@ -347,6 +374,15 @@ int main(int argc, char **argv)
|
|||
fd_set read_fd;
|
||||
sigset_t block;
|
||||
|
||||
/* init semaphore */
|
||||
sem = sem_open(SEM_NAME, 0);
|
||||
if (sem == NULL) {
|
||||
print_msg("sem_open() failed \n");
|
||||
print_msg("Error : %s \n", strerror(errno));
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
socket_fd = cmd_connect(params);
|
||||
if (socket_fd < 0) {
|
||||
ret = -1;
|
||||
|
@ -364,9 +400,19 @@ int main(int argc, char **argv)
|
|||
root = optarg;
|
||||
size = (uint32_t)strlen(root)+1;
|
||||
cmd[1] = '\002';
|
||||
/*
|
||||
* Synchronise haveged -c instance and daemon instance
|
||||
* prevent daemon instance from readin messages
|
||||
* from the socket until the -c instance finish writting
|
||||
*/
|
||||
sem_wait(sem);
|
||||
safeout(socket_fd, &cmd[0], 2);
|
||||
send_uinteger(socket_fd, size);
|
||||
safeout(socket_fd, root, size);
|
||||
/*
|
||||
* unblock the daemon instance as we finished writting
|
||||
*/
|
||||
sem_post(sem);
|
||||
break;
|
||||
case MAGIC_CLOSE:
|
||||
ptr = &cmd[0];
|
||||
|
@ -388,8 +434,8 @@ int main(int argc, char **argv)
|
|||
FD_SET(socket_fd, &read_fd);
|
||||
|
||||
do {
|
||||
struct timeval two = {6, 0};
|
||||
ret = select(socket_fd+1, &read_fd, NULL, NULL, &two);
|
||||
struct timeval timeout = {6, 0};
|
||||
ret = select(socket_fd+1, &read_fd, NULL, NULL, &timeout);
|
||||
if (ret >= 0) break;
|
||||
if (errno != EINTR)
|
||||
error_exit("Select error: %s", strerror(errno));
|
||||
|
@ -404,7 +450,7 @@ int main(int argc, char **argv)
|
|||
char *msg;
|
||||
ret = receive_uinteger(socket_fd, &size);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
goto err;
|
||||
msg = calloc(size, sizeof(char));
|
||||
if (!msg)
|
||||
error_exit("can not allocate memory for message from UNIX socket: %s",
|
||||
|
@ -427,9 +473,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
err:
|
||||
close(socket_fd);
|
||||
sem_close(sem);
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
else if (!(params->setup & RUN_AS_APP)){
|
||||
socket_fd = cmd_listen(params);
|
||||
if (socket_fd >= 0)
|
||||
fprintf(stderr, "%s: command socket is listening at fd %d\n", params->daemon, socket_fd);
|
||||
|
@ -442,6 +489,11 @@ int main(int argc, char **argv)
|
|||
fprintf(stderr, "%s: disabling command mode for this instance\n", params->daemon);
|
||||
}
|
||||
}
|
||||
/* Initilize named semaphore to synchronize command isntances */
|
||||
sem = sem_open(SEM_NAME, O_CREAT, 0644, 1);
|
||||
if (sem == NULL) {
|
||||
error_exit("Couldn't create nammed semaphore " SEM_NAME" error: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (params->tests_config == 0)
|
||||
|
@ -586,6 +638,7 @@ static void run_daemon( /* RETURN: nothing */
|
|||
#endif
|
||||
struct rand_pool_info *output;
|
||||
struct stat stat_buf;
|
||||
time_t t[2];
|
||||
|
||||
if (0 != params->run_level) {
|
||||
anchor_info(h);
|
||||
|
@ -617,8 +670,13 @@ static void run_daemon( /* RETURN: nothing */
|
|||
#else
|
||||
sigprocmask(SIG_BLOCK, &mask, &omask);
|
||||
#endif
|
||||
|
||||
|
||||
t[0] = 0;
|
||||
for(;;) {
|
||||
int current,nbytes,r,max=0;
|
||||
H_UINT fills;
|
||||
char buf[120];
|
||||
fd_set write_fd;
|
||||
#ifndef NO_COMMAND_MODE
|
||||
fd_set read_fd;
|
||||
|
@ -627,6 +685,32 @@ static void run_daemon( /* RETURN: nothing */
|
|||
if (params->exit_code > 128)
|
||||
error_exit("Stopping due to signal %d\n", params->exit_code - 128);
|
||||
|
||||
t[1] = time(NULL);
|
||||
if (t[1] - t[0] > params->time_interval) {
|
||||
/* add entropy on daemon start and then every TIME_INTERVAL seconds unconditionally */
|
||||
nbytes = poolSize;
|
||||
r = (nbytes+sizeof(H_UINT)-1)/sizeof(H_UINT);
|
||||
fills = h->n_fills;
|
||||
if (havege_rng(h, (H_UINT *)output->buf, r)<1)
|
||||
error_exit("RNG failed! %d", h->error);
|
||||
output->buf_size = nbytes;
|
||||
/* entropy is 8 bits per byte */
|
||||
output->entropy_count = nbytes * 8;
|
||||
if (ioctl(random_fd, RNDADDENTROPY, output) == -1)
|
||||
error_exit("RNDADDENTROPY failed!");
|
||||
h->n_entropy_bytes += nbytes;
|
||||
if (params->once == 1) {
|
||||
params->exit_code = 0;
|
||||
error_exit("Entropy refilled once (%d bytes), exiting.", nbytes);
|
||||
}
|
||||
if (0 != (params->verbose & H_RNDADDENTROPY_INFO) && h->n_fills > fills) {
|
||||
if (havege_status_dump(h, H_SD_TOPIC_SUM, buf, sizeof(buf))>0)
|
||||
print_msg("%s\n", buf);
|
||||
}
|
||||
t[0] = t[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
FD_ZERO(&write_fd);
|
||||
#ifndef NO_COMMAND_MODE
|
||||
if (socket_fd >= 0) {
|
||||
|
@ -646,20 +730,23 @@ static void run_daemon( /* RETURN: nothing */
|
|||
if (conn_fd > max)
|
||||
max = conn_fd;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for(;;) {
|
||||
struct timespec two = {2, 0};
|
||||
struct timespec timeout = {PSELECT_TIMEOUT, 0};
|
||||
int rc;
|
||||
#ifndef NO_COMMAND_MODE
|
||||
if (socket_fd >= 0) {
|
||||
rc = pselect(max+1, &read_fd, &write_fd, NULL, &two, &omask);
|
||||
rc = pselect(max+1, &read_fd, &write_fd, NULL, &timeout, &omask);
|
||||
} else {
|
||||
rc = pselect(max+1, NULL, &write_fd, NULL, &two, &omask);
|
||||
rc = pselect(max+1, NULL, &write_fd, NULL, &timeout, &omask);
|
||||
}
|
||||
#else
|
||||
rc = pselect(max+1, NULL, &write_fd, NULL, &two, &omask);
|
||||
rc = pselect(max+1, NULL, &write_fd, NULL, &timeout, &omask);
|
||||
#endif
|
||||
t[1] = time(NULL);
|
||||
if (t[1] - t[0] > params->time_interval) break;
|
||||
|
||||
if (rc >= 0) break;
|
||||
if (params->exit_code > 128)
|
||||
break;
|
||||
|
@ -686,7 +773,7 @@ static void run_daemon( /* RETURN: nothing */
|
|||
if (conn_fd >= 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (conn_fd >= 0 && FD_ISSET(conn_fd, &read_fd))
|
||||
conn_fd = socket_handler(conn_fd, path, argv, params);
|
||||
#endif
|
||||
|
@ -696,17 +783,24 @@ static void run_daemon( /* RETURN: nothing */
|
|||
if (ioctl(random_fd, RNDGETENTCNT, ¤t) == -1)
|
||||
error_exit("Couldn't query entropy-level from kernel");
|
||||
/* get number of bytes needed to fill pool */
|
||||
nbytes = (poolSize - current)/8;
|
||||
nbytes = (poolSize - current + 7)/8;
|
||||
if(nbytes<1) continue;
|
||||
/* get that many random bytes */
|
||||
r = (nbytes+sizeof(H_UINT)-1)/sizeof(H_UINT);
|
||||
fills = h->n_fills;
|
||||
if (havege_rng(h, (H_UINT *)output->buf, r)<1)
|
||||
error_exit("RNG failed! %d", h->error);
|
||||
output->buf_size = nbytes;
|
||||
/* entropy is 8 bits per byte */
|
||||
output->entropy_count = nbytes * 8;
|
||||
t[0] = t[1];
|
||||
if (ioctl(random_fd, RNDADDENTROPY, output) == -1)
|
||||
error_exit("RNDADDENTROPY failed!");
|
||||
h->n_entropy_bytes += nbytes;
|
||||
if (0 != (params->verbose & H_RNDADDENTROPY_INFO) && h->n_fills > fills) {
|
||||
if (havege_status_dump(h, H_SD_TOPIC_SUM, buf, sizeof(buf))>0)
|
||||
print_msg("%s\n", buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -717,7 +811,7 @@ static void set_watermark( /* RETURN: nothing */
|
|||
{
|
||||
FILE *wm_fh;
|
||||
|
||||
if ( (H_UINT) level > (poolSize - 32))
|
||||
if ( level > (poolSize - 32))
|
||||
level = poolSize - 32;
|
||||
wm_fh = fopen(params->watermark, "w");
|
||||
if (wm_fh) {
|
||||
|
@ -738,7 +832,7 @@ static void anchor_info(H_PTR h)
|
|||
char buf[120];
|
||||
H_SD_TOPIC topics[4] = {H_SD_TOPIC_BUILD, H_SD_TOPIC_TUNE, H_SD_TOPIC_TEST, H_SD_TOPIC_SUM};
|
||||
int i;
|
||||
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
if (havege_status_dump(h, topics[i], buf, sizeof(buf))>0)
|
||||
print_msg("%s\n", buf);
|
||||
|
@ -765,7 +859,7 @@ void error_exit( /* RETURN: nothing */
|
|||
#endif
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", params->daemon, buffer);
|
||||
if (0 !=(params->setup & RUN_AS_APP) && 0 != handle) {
|
||||
if (0 !=(params->setup & (RUN_AS_APP | RUN_IN_FG) ) && 0 != handle) {
|
||||
if (havege_status_dump(handle, H_SD_TOPIC_TEST, buffer, sizeof(buffer))>0)
|
||||
fprintf(stderr, "%s\n", buffer);
|
||||
if (havege_status_dump(handle, H_SD_TOPIC_SUM, buffer, sizeof(buffer))>0)
|
||||
|
@ -788,7 +882,7 @@ static int get_runsize( /* RETURN: the size */
|
|||
int p2 = 0;
|
||||
int p10 = APP_BUFF_SIZE * sizeof(H_UINT);
|
||||
long long ct;
|
||||
|
||||
|
||||
|
||||
f = strtod(bp, &suffix);
|
||||
if (f < 0 || strlen(suffix)>1)
|
||||
|
@ -852,7 +946,7 @@ static char *ppSize( /* RETURN: the formatted size */
|
|||
char units[] = {'T', 'G', 'M', 'K', 0};
|
||||
double factor = 1024.0 * 1024.0 * 1024.0 * 1024.0;
|
||||
int i;
|
||||
|
||||
|
||||
for (i=0;0 != units[i];i++) {
|
||||
if (sz >= factor)
|
||||
break;
|
||||
|
@ -869,7 +963,7 @@ void print_msg( /* RETURN: nothing */
|
|||
...) /* IN: args */
|
||||
{
|
||||
char buffer[128];
|
||||
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
snprintf(buffer, sizeof(buffer), "%s: %s", params->daemon, format);
|
||||
|
@ -907,7 +1001,7 @@ static void run_app( /* RETURN: nothing */
|
|||
#ifdef RAW_IN_ENABLE
|
||||
{
|
||||
char *format, *in="",*out,*sz,*src="";
|
||||
|
||||
|
||||
if (params->run_level==DIAG_RUN_INJECT)
|
||||
in = "tics";
|
||||
else if (params->run_level==DIAG_RUN_TEST)
|
||||
|
@ -922,7 +1016,7 @@ static void run_app( /* RETURN: nothing */
|
|||
else sz = "unlimited";
|
||||
out = (fout==stdout)? "stdout" : params->sample_out;
|
||||
fprintf(stderr, format, in, src, sz, out);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (limits)
|
||||
fprintf(stderr, "Writing %s output to %s\n",
|
||||
|
@ -987,7 +1081,7 @@ static void usage( /* OUT: nothing */
|
|||
const char **cmds) /* IN: associated text */
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
||||
(void)loc;
|
||||
fprintf(stderr, "\nUsage: %s [options]\n\n", params->daemon);
|
||||
#ifndef NO_DAEMON
|
||||
|
@ -999,7 +1093,7 @@ static void usage( /* OUT: nothing */
|
|||
for(i=j=0;long_options[i].val != 0;i++,j+=4) {
|
||||
while(cmds[j][0] != long_options[i].val && (j+4) < (nopts * 4))
|
||||
j += 4;
|
||||
fprintf(stderr," --%-10s, -%c %s %s\n",
|
||||
fprintf(stderr," --%-13s, -%c %s %s\n",
|
||||
long_options[i].name, long_options[i].val,
|
||||
long_options[i].has_arg? "[]":" ",cmds[j+3]);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2024 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
|
@ -32,6 +32,7 @@ struct pparams {
|
|||
H_UINT buffersz; /* size of collection buffer (kb) */
|
||||
H_UINT detached; /* non-zero if daemonized */
|
||||
H_UINT foreground; /* non-zero if running in foreground */
|
||||
H_UINT once; /* 1: refill entropy once and quit immediatelly */
|
||||
H_UINT run_level; /* type of run 0=daemon,1=setup,2=pip,sample kb */
|
||||
H_UINT d_cache; /* size of data cache (kb) */
|
||||
H_UINT i_cache; /* size of instruction cache (kb) */
|
||||
|
@ -47,14 +48,20 @@ struct pparams {
|
|||
char *version; /* Our version */
|
||||
char *watermark; /* path to write_wakeup_threshold */
|
||||
char *command; /* command which will be send/received */
|
||||
H_UINT time_interval; /* Time interval in seconds to add entropy unconditionally */
|
||||
};
|
||||
/**
|
||||
* Buffer size used when not running as daemon
|
||||
*/
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
||||
#define APP_BUFF_SIZE 1024
|
||||
#define INPUT_DEFAULT "data"
|
||||
#define OUTPUT_DEFAULT "sample"
|
||||
#define PID_DEFAULT "/var/run/haveged.pid"
|
||||
#define TIME_INTERVAL 60
|
||||
#define PSELECT_TIMEOUT 2
|
||||
/**
|
||||
* Setup options (for app)
|
||||
*/
|
||||
|
@ -67,6 +74,7 @@ struct pparams {
|
|||
#define SET_LWM 0x040
|
||||
#define MULTI_CORE 0x080
|
||||
#define CMD_MODE 0x100
|
||||
#define RUN_ONCE 0x200
|
||||
/**
|
||||
* Default tests settings
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2012-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2012-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Determine HAVEGE environment
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
** Copyright 2011-2012 BenEleventh Consulting manolson@beneleventh.com
|
||||
**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2014 Gary Wuertz gary@issiweb.com
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
** Simple entropy harvester based upon the havege RNG
|
||||
**
|
||||
** Copyright 2018-2021 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2018-2022 Jirka Hladky hladky DOT jiri AT gmail DOT com
|
||||
** Copyright 2009-2013 Gary Wuertz gary@issiweb.com
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
|
|
Loading…
Add table
Reference in a new issue