From c13ae5ba2872a67fdb5a1ab735ead51b82774094 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 8 Mar 2019 04:21:45 +0100 Subject: [PATCH] asu: improve packaging * use gunicorn instead of Flask for main server threads * generate and deploy random database password * provide distribution files Signed-off-by: Daniel Golle --- devel/asu/Makefile | 4 ++-- devel/asu/files/asu.defaults | 15 +++++++++++---- devel/asu/files/asu.init | 11 +++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/devel/asu/Makefile b/devel/asu/Makefile index b7da2dc2b..4f9076649 100644 --- a/devel/asu/Makefile +++ b/devel/asu/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asu PKG_VERSION:=0.2.3 -PKG_RELEASE=1 +PKG_RELEASE=2 PKG_LICENSE:=GPL-3.0 @@ -37,7 +37,7 @@ define Package/asu URL:=http://github.com/aparcar/gsoc17-attended-sysupgrade/ DEPENDS:=$(IMAGEBUILDER_DEPENDS) +pgsql-server +psqlodbcw \ +python3-ctypes +python3-distutils +python3-flask \ - +python3-openssl +python3-pyodbc +python3-yaml \ + +gunicorn +python3-openssl +python3-pyodbc +python3-yaml \ +libustream-mbedtls +ca-certificates +gnupg USERID:=asu:asu VARIANT:=python3 diff --git a/devel/asu/files/asu.defaults b/devel/asu/files/asu.defaults index 8fb2d7ea0..04fdf0722 100644 --- a/devel/asu/files/asu.defaults +++ b/devel/asu/files/asu.defaults @@ -1,15 +1,22 @@ #!/bin/sh -asu_tables="$(ls -1 /usr/lib/*/site-packages/asu/utils/tables.sql | head -n 1)" +asu_password=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | sha256sum | cut -d' ' -f1) +asu_tables="$(ls -1 /usr/lib/python*/site-packages/asu/utils/tables.sql | head -n 1)" + uci -q batch <