aboutsummaryrefslogtreecommitdiffstats
path: root/testing/entropybroker
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2019-03-27 21:33:14 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2019-04-01 19:24:05 +0000
commit6880dfb6e909b5cb5d73e770f5a0f4227515b610 (patch)
treec82ad2b6ef17faffc8bc97b007df4df079c71c9a /testing/entropybroker
parenta9bccb09bad16864922406dbe9286e05f7402574 (diff)
downloadaports-6880dfb6e909b5cb5d73e770f5a0f4227515b610.tar.bz2
aports-6880dfb6e909b5cb5d73e770f5a0f4227515b610.tar.xz
testing/entropybroker: new aport
Diffstat (limited to 'testing/entropybroker')
-rw-r--r--testing/entropybroker/APKBUILD69
-rw-r--r--testing/entropybroker/entropybroker.confd5
-rw-r--r--testing/entropybroker/entropybroker.initd8
-rw-r--r--testing/entropybroker/font-path.patch29
-rw-r--r--testing/entropybroker/make.patch25
-rw-r--r--testing/entropybroker/missing-include.patch12
-rw-r--r--testing/entropybroker/musl-link-libexecinfo.patch13
-rw-r--r--testing/entropybroker/use-sched_yield.patch28
-rw-r--r--testing/entropybroker/version.patch5
9 files changed, 194 insertions, 0 deletions
diff --git a/testing/entropybroker/APKBUILD b/testing/entropybroker/APKBUILD
new file mode 100644
index 0000000000..3e76a1678e
--- /dev/null
+++ b/testing/entropybroker/APKBUILD
@@ -0,0 +1,69 @@
+# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
+# Maintainer:
+pkgname=entropybroker
+pkgver=2.9
+pkgrel=0
+pkgdesc="infrastructure for distributing random numbers (entropy data)"
+url="https://www.vanheusden.com/entropybroker/"
+arch="x86 x86_64" # problems with libusb on other arches
+license="AGPL-3.0"
+checkdepends="cppcheck"
+depends="ttf-freefont"
+makedepends="
+ crypto++-dev
+ gd-dev
+ libexecinfo-dev
+ libpng-dev
+ libusb-dev
+ linux-headers
+ pcsc-lite-dev
+ zlib-dev
+ "
+subpackages="$pkgname-doc $pkgname-openrc"
+source="entropybroker-$pkgver.tar.gz::https://github.com/flok99/entropybroker/archive/$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+
+ make.patch
+ missing-include.patch
+ use-sched_yield.patch
+ musl-link-libexecinfo.patch
+ version.patch
+ font-path.patch
+ "
+builddir="$srcdir/entropybroker-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr
+ make everything
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+
+ install -Dm644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="77d3e73b96db485d1051a2da553e29ee4726410e2960918d87aa94132fc941a43bc82aab2b5eb59ea6851871b2d6d53330e26a02eb70764abafdc6a34bd544bb entropybroker-2.9.tar.gz
+8d47f99c8c9980637e0c0946d6aaec104a4a754343bcbf48106b809053654970bdceb30f7cf34f0df3dd6a6f924693833f8faa356298531336a876fbf1d30287 entropybroker.initd
+56c80c571abe29b380e11f229391bf69f63aaaddc80e5dc6c3ebaea80e7eba05823d03ca06a258a0374de40b305dcd7735ec3e58e17763796dc3c4151df3dd66 entropybroker.confd
+12b9ceaf75d6f7462718e55a13883d01ba054a86692b79b8192e6fb219c948e92f67601a3bb78bffdc80879b0599ba56291e6438125ec90267b95985f264ad12 make.patch
+e92cc2e6e8a18dc095d653116fca562e3450796b0b7ff9c769dea0790333ac84b382e921306612b4e4ea5c1e504808e0efe69505c12b135c9add38d8c3e63869 missing-include.patch
+1849586b1719fec241ab34955c4e73f67692193db19153ff062e359a1bfab4f9bb1f2a33a5a2103e38f189689f416a61cce40448b6bccc72269eeac89c0354ff use-sched_yield.patch
+7f77a3117af1041b67b76fd09f9bb94954c72216f0187d3a5faa13824a5f906661f4b05bac506edec301bae4349fa02939cc781ec5b47ecfc49f64e52ba31e7d musl-link-libexecinfo.patch
+b29b7261a4547d52bc85215682e84dbd3e91a3422e2fa53d36c6df49deb819e02ddc072648cc4310776b3121f36cea479fde7cb5c148a38651a8dbe8179f89fe version.patch
+08cd42c57baba8a4ebed43926e11fb9f95731c7b1e02833bb7aadaa452feca35892759d06aaa3a43beababe0c856cf504ccd198f82deadfe1e4f0eca1cb0d5ef font-path.patch"
diff --git a/testing/entropybroker/entropybroker.confd b/testing/entropybroker/entropybroker.confd
new file mode 100644
index 0000000000..51496613f2
--- /dev/null
+++ b/testing/entropybroker/entropybroker.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/entropybroker
+
+# Any extra options you want to pass to entropybroker
+# on start-up should be put here.
+EB_OPTS="-s -S /var/log/entropy_broker.stats"
diff --git a/testing/entropybroker/entropybroker.initd b/testing/entropybroker/entropybroker.initd
new file mode 100644
index 0000000000..b4fc274832
--- /dev/null
+++ b/testing/entropybroker/entropybroker.initd
@@ -0,0 +1,8 @@
+#!/sbin/openrc-run
+
+command="/usr/bin/entropy_broker"
+command_args="$EB_OPTS"
+
+depend() {
+ need net
+}
diff --git a/testing/entropybroker/font-path.patch b/testing/entropybroker/font-path.patch
new file mode 100644
index 0000000000..9b018be989
--- /dev/null
+++ b/testing/entropybroker/font-path.patch
@@ -0,0 +1,29 @@
+commit 3f0a5d44cccbd257226876e91730f2e2f9d89741
+Author: Henrik Riomar <henrik.riomar@gmail.com>
+Date: Wed Mar 27 21:51:55 2019 +0100
+
+ makefile: fix font path
+
+diff --git a/Makefile b/Makefile
+index e7a6b41..1c612ce 100644
+--- a/Makefile
++++ b/Makefile
+@@ -11,7 +11,7 @@ PID=$(VAR)/run
+ MAN=$(PREFIX)/usr/share/man
+ WEB=$(PREFIX)/usr/share/entropybroker/web
+ DOC=$(PREFIX)/usr/share/doc/entropybroker
+-FONT=/usr/share/fonts/truetype/freefont/FreeMono.ttf
++FONT=/usr/share/fonts/TTF/FreeMono.ttf
+
+ CXX=g++
+ DEBUG= # -pg #-DHELGRIND #-DCRYPTO_DEBUG #-D_DEBUG #-fprofile-arcs -ftest-coverage # -pg
+diff --git a/entropy_broker.conf b/entropy_broker.conf
+index 4ec9347..f716b91 100644
+--- a/entropy_broker.conf
++++ b/entropy_broker.conf
+@@ -94,4 +94,4 @@ users = users.txt
+ # set port to -1 to disable
+ webserver_interface = 0.0.0.0
+ webserver_port = 48923
+-# graph_font = /usr/share/fonts/truetype/freefont/FreeMono.ttf
++# graph_font = /usr/share/fonts/TTF/FreeMono.ttf
diff --git a/testing/entropybroker/make.patch b/testing/entropybroker/make.patch
new file mode 100644
index 0000000000..7da329ab28
--- /dev/null
+++ b/testing/entropybroker/make.patch
@@ -0,0 +1,25 @@
+index 7e27ed5..7d1f206 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,15 +2,15 @@ include version
+
+ -include makefile.inc
+
+-PREFIX=/usr/local/entropybroker
+-BIN=$(PREFIX)/bin
+-ETC=$(PREFIX)/etc
++PREFIX=$(DESTDIR)
++BIN=$(PREFIX)/usr/bin
++ETC=$(PREFIX)/etc/entropybroker
+ VAR=$(PREFIX)/var
+ CACHE=$(VAR)/cache
+ PID=$(VAR)/run
+-MAN=$(PREFIX)/share/man
+-WEB=$(PREFIX)/share/eb/web
+-DOC=$(PREFIX)/doc
++MAN=$(PREFIX)/usr/share/man
++WEB=$(PREFIX)/usr/share/entropybroker/web
++DOC=$(PREFIX)/usr/share/doc/entropybroker
+ FONT=/usr/share/fonts/truetype/freefont/FreeMono.ttf
+
+ CXX=g++
diff --git a/testing/entropybroker/missing-include.patch b/testing/entropybroker/missing-include.patch
new file mode 100644
index 0000000000..a3c8c51bb0
--- /dev/null
+++ b/testing/entropybroker/missing-include.patch
@@ -0,0 +1,12 @@
+diff --git a/protocol.cpp b/protocol.cpp
+index 40e4941..163af9c 100644
+--- a/protocol.cpp
++++ b/protocol.cpp
+@@ -7,6 +7,7 @@
+ #include <string>
+ #include <map>
+ #include <vector>
++#include <sys/select.h>
+
+ #include "defines.h"
+ #include "error.h"
diff --git a/testing/entropybroker/musl-link-libexecinfo.patch b/testing/entropybroker/musl-link-libexecinfo.patch
new file mode 100644
index 0000000000..595db2efdf
--- /dev/null
+++ b/testing/entropybroker/musl-link-libexecinfo.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 39374f0..fcf95c1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@ CXX=g++
+ DEBUG= # -pg #-DHELGRIND #-DCRYPTO_DEBUG #-D_DEBUG #-fprofile-arcs -ftest-coverage # -pg
+ LINT=-Wshadow -Wall # -W -Wconversion -Wwrite-strings -Wunused
+ CXXFLAGS+=-O3 -ggdb -DVERSION=\"${VERSION}\" $(LINT) $(DEBUG) -DCONFIG=\"${ETC}/entropy_broker.conf\" -DCACHE_DIR=\"${CACHE}\" -DPID_DIR=\"${PID}\" -DVAR_DIR=\"${VAR}\" -DWEB_DIR=\"${WEB}\" -DFONT=\"${FONT}\" -rdynamic $(PCSC_CFLAGS)
+-LDFLAGS+=$(DEBUG) -lrt -lz -lutil -rdynamic -lcryptopp -pthread
++LDFLAGS+=$(DEBUG) -lrt -lz -lutil -rdynamic -lcryptopp -pthread -lexecinfo
+
+ ifeq ($(TFO),yes)
+ CXXFLAGS+=-DTCP_TFO
diff --git a/testing/entropybroker/use-sched_yield.patch b/testing/entropybroker/use-sched_yield.patch
new file mode 100644
index 0000000000..6a06bcc310
--- /dev/null
+++ b/testing/entropybroker/use-sched_yield.patch
@@ -0,0 +1,28 @@
+diff --git a/utils.cpp b/utils.cpp
+index 33a8f97..805035f 100644
+--- a/utils.cpp
++++ b/utils.cpp
+@@ -1,5 +1,5 @@
+ #include <string>
+-#include <pthread.h>
++#include <sched.h>
+ #include <vector>
+ #include <stdarg.h>
+ #include <unistd.h>
+@@ -26,6 +26,7 @@
+ #ifdef linux
+ #include <sys/syscall.h>
+ #endif
++# include <sched.h>
+
+ #include "defines.h"
+ #include "error.h"
+@@ -641,7 +642,7 @@ void my_yield()
+ {
+ // sched_yield
+
+- pthread_check(pthread_yield(), "pthread_yield");
++ pthread_check(sched_yield(), "sched_yield");
+ }
+
+ bool file_exist(const char *file)
diff --git a/testing/entropybroker/version.patch b/testing/entropybroker/version.patch
new file mode 100644
index 0000000000..f21e6cb34c
--- /dev/null
+++ b/testing/entropybroker/version.patch
@@ -0,0 +1,5 @@
+--- a/version
++++ b/version
+@@ -1 +1 @@
+-VERSION=2.8
++VERSION=2.9