Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add kopia #5845

Merged
merged 11 commits into from
Jun 16, 2024
Prev Previous commit
Next Next commit
Update to 0.17.0, Added wizard, added TLS, prefer env rather than export
unset USER as this conflicts with kopia,
as it tries to create a repository when USER is set
  • Loading branch information
publicarray committed Apr 20, 2024
commit d42dbc6b7832fc56ec92a69f591e2a201e30b520
2 changes: 1 addition & 1 deletion cross/kopia/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = kopia
PKG_VERS = 0.15.0
PKG_VERS = 0.17.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-linux-$(PKG_DIST_ARCH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/kopia/kopia/releases/download/v$(PKG_VERS)
Expand Down
18 changes: 9 additions & 9 deletions cross/kopia/digests
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
kopia-0.15.0-linux-x64.tar.gz SHA1 1fbbe6eebbe7e109d0c289858022287f2abec8ca
kopia-0.15.0-linux-x64.tar.gz SHA256 ebb5a19dd2754dc45a9377b067b7dc82a0b894c8fda62900fc903a536f6dc98d
kopia-0.15.0-linux-x64.tar.gz MD5 f81b3a582adbff688cb35fbbf14a3be7
kopia-0.15.0-linux-arm.tar.gz SHA1 5d91e39b8e070615e46f8cbcdc1bb10b5d669323
kopia-0.15.0-linux-arm.tar.gz SHA256 ff6cf2eec7b88329010d149bbcc46a10a1506db71ad260d303087a1491fb3046
kopia-0.15.0-linux-arm.tar.gz MD5 d36808ac38a93fabd61a7c1010ede925
kopia-0.15.0-linux-arm64.tar.gz SHA1 b0b92f5a6e9d441166d3e597da2589358567ac9b
kopia-0.15.0-linux-arm64.tar.gz SHA256 be648f18d476a2f2c46e5aac135817917a81ddead6c80d5120008e02e23639df
kopia-0.15.0-linux-arm64.tar.gz MD5 6c2e031ce9c10f63ebf5e15244a3b04b
kopia-0.17.0-linux-x64.tar.gz SHA1 5afb387ea490ab17e00db04d48dba0e4b76049d9
kopia-0.17.0-linux-x64.tar.gz SHA256 6851bba9f49c2ca2cabc5bec85a813149a180472d1e338fad42a8285dad047ee
kopia-0.17.0-linux-x64.tar.gz MD5 45f22473e0de02e4fb086698b0cac43d
kopia-0.17.0-linux-arm.tar.gz SHA1 e15363951883134e1f3728bfaa4dff1cd97d76be
kopia-0.17.0-linux-arm.tar.gz SHA256 25804d7271a0dfe6d0821270c5640caa01da5e05a03a7c4783fd1edafb234d51
kopia-0.17.0-linux-arm.tar.gz MD5 1a53555bd2de5ec5b8856fa49fd9acdf
kopia-0.17.0-linux-arm64.tar.gz SHA1 a482d045179f84c85f764fe3532c14ff2248d02a
kopia-0.17.0-linux-arm64.tar.gz SHA256 9679415cd2717a90cb6a793aa2d4accde4059084245b27fa4807d7e13fbe40a0
kopia-0.17.0-linux-arm64.tar.gz MD5 5e6223f90b0374e2a990a729153ae2b4
3 changes: 2 additions & 1 deletion spk/kopia/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SPK_NAME = kopia
SPK_VERS = 0.15.0
SPK_VERS = 0.17.0
SPK_REV = 1
SPK_ICON = src/kopia.png

Expand All @@ -19,6 +19,7 @@ SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
SERVICE_PORT = 51515
ADMIN_PORT = $(SERVICE_PORT)
WIZARDS_DIR = src/wizard/

POST_STRIP_TARGET = kopia_extra_install

Expand Down
16 changes: 9 additions & 7 deletions spk/kopia/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
export KOPIA_LOG_DIR=${SYNOPKG_PKGVAR}
export KOPIA_CACHE_DIR=${SYNOPKG_PKGVAR}
export XDG_CACHE_HOME=${SYNOPKG_PKGVAR}/cache
export KOPIA_CONFIG_PATH=${SYNOPKG_PKGVAR}/config

#PASSWORD=${wizard_password}
PASSWORD=kopia
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/kopia server start --ui --insecure --address=http:https://0.0.0.0:${SERVICE_PORT} --server-password=${PASSWORD} --legacy-api --grpc --control-api"
ENV="USER= KOPIA_LOG_DIR=${SYNOPKG_PKGVAR} KOPIA_CACHE_DIR=${SYNOPKG_PKGVAR} KOPIA_CONFIG_PATH=${SYNOPKG_PKGVAR}/config"
TLS_CONFIG="--tls-generate-cert --tls-cert-file ${SYNOPKG_PKGVAR}/default.crt --tls-key-file ${SYNOPKG_PKGVAR}/default.key"
KOPIA=${SYNOPKG_PKGDEST}/bin/kopia
SERVICE_COMMAND="${KOPIA} server start --ui ${TLS_CONFIG} --address=0.0.0.0:${SERVICE_PORT} --grpc --control-api --enable-actions"
SVC_BACKGROUND=yes
SVC_WRITE_PID=yes

service_prestart () {
call_func "load_variables_from_file"
SERVICE_COMMAND+=" --server-username=${wizard_username} --server-password=${wizard_password}"
}
35 changes: 35 additions & 0 deletions spk/kopia/src/wizard/install_uifile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"step_title": "Kopia Configuration",
"invalid_next_disabled": true,
"items": [
{
"desc": "Permissions for the package are managed by a \"System internal user\" named <b>sc-kopia</b>.Please read <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
},
{
"type": "textfield",
"desc": "Kopia Settings",
"subitems": [
{
"key": "wizard_userame",
"desc": "Web Username",
"defaultValue": "kopia",
"validator": {
"allowBlank": false,
"minLength": 1
}
},
{
"key": "wizard_password",
"desc": "Web Password",
"defaultValue": "kopiakopia",
"validator": {
"allowBlank": false,
"minLength": 8
}
}
]
}
]
}
]