committed by
Norman Feske
parent
c8774a9b6a
commit
1a29597d57
1
ports/umurmur.hash
Normal file
1
ports/umurmur.hash
Normal file
@@ -0,0 +1 @@
|
||||
a194b75e385ebbd429835056c75917373be5b4e1
|
||||
10
ports/umurmur.port
Normal file
10
ports/umurmur.port
Normal file
@@ -0,0 +1,10 @@
|
||||
LICENSE := BSD
|
||||
VERSION := 0.2.17
|
||||
DOWNLOADS := umurmur.archive
|
||||
|
||||
URL(umurmur) := https://github.com/umurmur/umurmur/archive/0.2.17.tar.gz
|
||||
SHA(umurmur) := e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2
|
||||
DIR(umurmur) := src/app/umurmur
|
||||
|
||||
PATCHES := src/app/umurmur/umurmur.patch
|
||||
PATCH_OPT := -p1 -d src/app/umurmur
|
||||
2
recipes/pkg/umurmur/README
Normal file
2
recipes/pkg/umurmur/README
Normal file
@@ -0,0 +1,2 @@
|
||||
uMurmur is a minimalistic Mumble server primarily targeted to run on
|
||||
embedded computers.
|
||||
10
recipes/pkg/umurmur/archives
Normal file
10
recipes/pkg/umurmur/archives
Normal file
@@ -0,0 +1,10 @@
|
||||
_/src/libc
|
||||
_/src/libconfig
|
||||
_/src/libcrypto
|
||||
_/src/libssl
|
||||
_/src/posix
|
||||
_/src/protobuf-c
|
||||
_/src/vfs
|
||||
_/src/vfs_lwip
|
||||
_/src/vfs_jitterentropy
|
||||
_/src/zlib
|
||||
1
recipes/pkg/umurmur/hash
Normal file
1
recipes/pkg/umurmur/hash
Normal file
@@ -0,0 +1 @@
|
||||
2018-09-26 30f1f0f22c4926ab7b4fa795d1cb4d7db14c3f08
|
||||
61
recipes/pkg/umurmur/runtime
Normal file
61
recipes/pkg/umurmur/runtime
Normal file
@@ -0,0 +1,61 @@
|
||||
<runtime ram="8M" caps="200" binary="umurmur">
|
||||
|
||||
<requires>
|
||||
<nic/>
|
||||
<timer/>
|
||||
<rtc/>
|
||||
</requires>
|
||||
|
||||
<content>
|
||||
<rom label="umurmur"/>
|
||||
<rom label="ld.lib.so"/>
|
||||
<rom label="libc.lib.so"/>
|
||||
<rom label="libconfig.lib.so"/>
|
||||
<rom label="libcrypto.lib.so"/>
|
||||
<rom label="libm.lib.so"/>
|
||||
<rom label="libssl.lib.so"/>
|
||||
<rom label="posix.lib.so"/>
|
||||
<rom label="protobuf-c.lib.so"/>
|
||||
<rom label="vfs.lib.so"/>
|
||||
<rom label="vfs_jitterentropy.lib.so"/>
|
||||
<rom label="vfs_lwip.lib.so"/>
|
||||
<rom label="zlib.lib.so"/>
|
||||
</content>
|
||||
|
||||
<config>
|
||||
<vfs>
|
||||
<dir name="dev">
|
||||
<log/> <rtc/>
|
||||
<jitterentropy name="random"/>
|
||||
</dir>
|
||||
|
||||
<dir name="socket"> <lwip dhcp="yes"/> </dir>
|
||||
<dir name="etc">
|
||||
<inline name="umurmur.conf">
|
||||
max_bandwidth = 48000;
|
||||
welcometext = "Welcome to uMurmur!";
|
||||
# certificate = "/etc/umurmur/cert.crt";
|
||||
# private_key = "/etc/umurmur/key.key";
|
||||
password = "";
|
||||
max_users = 10;
|
||||
channels = ( {
|
||||
name = "Root";
|
||||
parent = "";
|
||||
description = "Root channel. No entry.";
|
||||
noenter = true;
|
||||
},
|
||||
{
|
||||
name = "Lobby";
|
||||
parent = "Root";
|
||||
description = "Lobby channel";
|
||||
}
|
||||
);
|
||||
default_channel = "Lobby";
|
||||
</inline>
|
||||
<ram/>
|
||||
</dir>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" socket="/socket"/>
|
||||
</config>
|
||||
|
||||
</runtime>
|
||||
12
recipes/src/umurmur/content.mk
Normal file
12
recipes/src/umurmur/content.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
content: src/app/umurmur LICENSE
|
||||
|
||||
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/umurmur)
|
||||
|
||||
src/app/umurmur:
|
||||
mkdir -p $@
|
||||
cp $(PORT_DIR)/src/app/umurmur/src/* $@
|
||||
cp $(REP_DIR)/src/app/umurmur/* $@
|
||||
rm $@/umurmur.patch
|
||||
|
||||
LICENSE:
|
||||
cp $(PORT_DIR)/src/app/umurmur/LICENSE $@
|
||||
1
recipes/src/umurmur/hash
Normal file
1
recipes/src/umurmur/hash
Normal file
@@ -0,0 +1 @@
|
||||
2018-09-26 9150eebfbcac451c42eef2ded043574a70959683
|
||||
8
recipes/src/umurmur/used_apis
Normal file
8
recipes/src/umurmur/used_apis
Normal file
@@ -0,0 +1,8 @@
|
||||
libc
|
||||
libconfig
|
||||
libcrypto
|
||||
libssl
|
||||
os
|
||||
posix
|
||||
protobuf-c
|
||||
vfs
|
||||
133
run/umurmur.run
Normal file
133
run/umurmur.run
Normal file
@@ -0,0 +1,133 @@
|
||||
if {![have_include power_on/qemu]} {
|
||||
puts "\n Run script is not supported on this platform. \n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
drivers/nic
|
||||
lib/vfs/lwip
|
||||
app/umurmur
|
||||
}
|
||||
|
||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
append_platform_drv_build_components
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
#
|
||||
# Generate config
|
||||
#
|
||||
|
||||
set config {
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<default caps="100"/>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Timer"/> </provides>
|
||||
</start>}
|
||||
|
||||
append_platform_drv_config
|
||||
|
||||
append config {
|
||||
<start name="nic_drv" caps="130">
|
||||
<resource name="RAM" quantum="20M"/>
|
||||
<provides><service name="Nic"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="umurmur" caps="120">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<dir name="dev">
|
||||
<log/>
|
||||
<inline name="rtc">2018-09-24 00:00</inline>
|
||||
<inline name="random">012345678</inline>
|
||||
</dir>
|
||||
|
||||
<dir name="socket"> <lwip dhcp="yes"/> </dir>
|
||||
|
||||
<dir name="etc">
|
||||
<inline name="umurmur.conf">
|
||||
max_bandwidth = 48000;
|
||||
welcometext = "Welcome to uMurmur!";
|
||||
# certificate = "/etc/umurmur/cert.crt";
|
||||
# private_key = "/etc/umurmur/key.key";
|
||||
password = "";
|
||||
max_users = 10;
|
||||
channels = ( {
|
||||
name = "Root";
|
||||
parent = "";
|
||||
description = "Root channel. No entry.";
|
||||
noenter = true;
|
||||
},
|
||||
{
|
||||
name = "Lobby";
|
||||
parent = "Root";
|
||||
description = "Lobby channel";
|
||||
}
|
||||
);
|
||||
default_channel = "Lobby";
|
||||
</inline>
|
||||
<ram/>
|
||||
</dir>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" socket="/socket"/>
|
||||
</config>
|
||||
</start>}
|
||||
|
||||
append config {
|
||||
</config>}
|
||||
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init timer nic_drv
|
||||
ld.lib.so libc.lib.so vfs.lib.so vfs_lwip.lib.so
|
||||
libcrypto.lib.so libssl.lib.so
|
||||
libm.lib.so posix.lib.so
|
||||
libconfig.lib.so protobuf-c.lib.so
|
||||
umurmur
|
||||
}
|
||||
|
||||
# platform-specific modules
|
||||
append_platform_drv_boot_modules
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
#
|
||||
# Execute test case
|
||||
#
|
||||
|
||||
# qemu config
|
||||
append qemu_args " -nographic -net nic,model=e1000 "
|
||||
append qemu_args " -net user -redir tcp:64738::64738 "
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
# vi: set ft=tcl :
|
||||
52
src/app/umurmur/config.h
Normal file
52
src/app/umurmur/config.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#define DEFAULT_CONFIG "/etc/umurmur.conf"
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_FTRUNCATE 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_GOOGLE_PROTOBUF_C_PROTOBUF_C_H 1
|
||||
#define HAVE_INET_NTOA 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIBCONFIG 1
|
||||
#define HAVE_LIBCONFIG_H 1
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
#define HAVE_LIBPROTOBUF_C 1
|
||||
#define HAVE_LIBSSL 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MEMCHR 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
#define HAVE_OPENSSL_SSL_H 1
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE_SOCKET 1
|
||||
#define HAVE_STDBOOL_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_SYSLOG_H 1
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE__BOOL 1
|
||||
|
||||
#define PACKAGE "umurmur"
|
||||
#define PACKAGE_BUGREPORT "https://github.com/umurmur/umurmur/issues/new"
|
||||
#define PACKAGE_NAME "umurmur"
|
||||
#define PACKAGE_STRING "umurmur 0.2.16"
|
||||
#define PACKAGE_TARNAME "umurmur"
|
||||
#define PACKAGE_URL "http://github.com/umurmur/umurmur"
|
||||
#define PACKAGE_VERSION "0.2.16"
|
||||
#define STDC_HEADERS 1
|
||||
#define VERSION "0.2.16"
|
||||
4
src/app/umurmur/dummy.c
Normal file
4
src/app/umurmur/dummy.c
Normal file
@@ -0,0 +1,4 @@
|
||||
int sched_get_priority_min(int policy)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
32
src/app/umurmur/target.mk
Normal file
32
src/app/umurmur/target.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
TARGET := umurmur
|
||||
|
||||
UMURMUR_DIR := $(call select_from_ports,umurmur)/src/app/umurmur/src
|
||||
|
||||
SRC_C := Mumble.pb-c.c \
|
||||
ban.c \
|
||||
channel.c \
|
||||
client.c \
|
||||
conf.c \
|
||||
crypt.c \
|
||||
log.c \
|
||||
main.c \
|
||||
memory.c \
|
||||
messagehandler.c \
|
||||
messages.c \
|
||||
pds.c \
|
||||
server.c \
|
||||
ssli_openssl.c \
|
||||
timer.c \
|
||||
util.c \
|
||||
voicetarget.c
|
||||
|
||||
SRC_C += dummy.c
|
||||
|
||||
INC_DIR += $(UMURMUR_DIR) $(PRG_DIR)
|
||||
|
||||
LIBS += libc libcrypto libssl protobuf-c libconfig posix
|
||||
|
||||
vpath %.c $(UMURMUR_DIR)
|
||||
vpath %.c $(PRG_DIR)
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
27
src/app/umurmur/umurmur.patch
Normal file
27
src/app/umurmur/umurmur.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/src/main.c 2017-04-29 12:48:50.000000000 +0200
|
||||
+++ b/src/main.c 2018-09-25 23:02:45.496486188 +0200
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
- bool_t nodaemon = false;
|
||||
+ bool_t nodaemon = true;
|
||||
#ifdef POSIX_PRIORITY_SCHEDULING
|
||||
bool_t realtime = false;
|
||||
#endif
|
||||
--- a/src/server.c 2017-04-29 12:48:50.000000000 +0200
|
||||
+++ b/src/server.c 2018-09-25 23:12:37.492917577 +0200
|
||||
@@ -71,9 +71,10 @@
|
||||
hasv4 = (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) ? false : true;
|
||||
if (!(testsocket < 0)) close(testsocket);
|
||||
|
||||
- testsocket = socket(PF_INET6, SOCK_STREAM, 0);
|
||||
- hasv6 = (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) ? false : true;
|
||||
- if (!(testsocket < 0)) close(testsocket);
|
||||
+ // testsocket = socket(PF_INET6, SOCK_STREAM, 0);
|
||||
+ // hasv6 = (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) ? false : true;
|
||||
+ // if (!(testsocket < 0)) close(testsocket);
|
||||
+ hasv6 = false;
|
||||
|
||||
if(!hasv4)
|
||||
{
|
||||
Reference in New Issue
Block a user