-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add kopia - this is an initial commit with hardcoded password kopia * fix package installation * add download-all target - additionally download all files when PKG_DIST_ARCH_LIST is defined - use download-all target for download in github action * update kopia to v0.15.0 - update kopia to latest release - configure and install folders for config and cache * 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 * Fix blank username/password from wizard and Fix TLS cert generation * Update protocol to https --------- Co-authored-by: publicarray <[email protected]>
- Loading branch information
1 parent
dec856f
commit e1dfbea
Showing
9 changed files
with
161 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
PKG_NAME = kopia | ||
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) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)-linux-$(PKG_DIST_ARCH) | ||
|
||
UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) | ||
|
||
HOMEPAGE = https://kopia.io/ | ||
COMMENT = Kopia is a fast and secure open-source backup/restore tool that allows you to create encrypted snapshots of your data and save the snapshots to remote or cloud storage of your choice, to network-attached storage or server, or locally on your machine. | ||
LICENSE = Apache 2.0 | ||
|
||
INSTALL_TARGET = kopia_install | ||
|
||
# use digests with multiple files | ||
PKG_DIST_ARCH_LIST = x64 arm arm64 | ||
|
||
include ../../mk/spksrc.archs.mk | ||
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) | ||
PKG_DIST_ARCH = x64 | ||
else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) | ||
PKG_DIST_ARCH = arm | ||
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) | ||
PKG_DIST_ARCH = arm64 | ||
endif | ||
|
||
include ../../mk/spksrc.install-resources.mk | ||
|
||
.PHONY: kopia_install | ||
kopia_install: | ||
@install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin | ||
@$(RUN) ; cp -f $(PKG_NAME) $(STAGING_INSTALL_PREFIX)/bin/ | ||
@chmod +x $(STAGING_INSTALL_PREFIX)/bin/$(PKG_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin:bin/kopia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SPK_NAME = kopia | ||
SPK_VERS = 0.17.0 | ||
SPK_REV = 1 | ||
SPK_ICON = src/kopia.png | ||
|
||
DEPENDS = cross/kopia | ||
|
||
UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) | ||
|
||
MAINTAINER = SynoCommunity | ||
DISPLAY_NAME = Kopia | ||
DESCRIPTION = Kopia is a fast and secure open-source backup/restore tool that allows you to create encrypted snapshots of your data and save the snapshots to remote or cloud storage of your choice, to network-attached storage or server, or locally on your machine. | ||
HOMEPAGE = https://kopia.io/ | ||
LICENSE = Apache 2.0 | ||
CHANGELOG = "Initial package release" | ||
|
||
STARTABLE = yes | ||
SERVICE_USER = auto | ||
SERVICE_SETUP = src/service-setup.sh | ||
SERVICE_PORT = 51515 | ||
SERVICE_PORT_PROTOCOL = https | ||
ADMIN_PORT = $(SERVICE_PORT) | ||
ADMIN_PROTOCOL = https | ||
WIZARDS_DIR = src/wizard/ | ||
|
||
POST_STRIP_TARGET = kopia_extra_install | ||
|
||
SPK_COMMANDS = bin/kopia | ||
|
||
include ../../mk/spksrc.spk.mk | ||
|
||
.PHONY: kopia_extra_install | ||
kopia_extra_install: | ||
@$(MSG) Create config folders under var | ||
@install -d $(STAGING_DIR)/var/config $(STAGING_DIR)/var/cache |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export XDG_CACHE_HOME=${SYNOPKG_PKGVAR}/cache | ||
export KOPIA_LOG_DIR=${SYNOPKG_PKGVAR} | ||
export KOPIA_CACHE_DIR=${SYNOPKG_PKGVAR} | ||
export KOPIA_CONFIG_PATH=${SYNOPKG_PKGVAR}/config/config.json | ||
TLS_CONFIG="--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 () { | ||
wizard_password=$(cat "${SYNOPKG_PKGVAR}/pwd") | ||
wizard_username=$(cat "${SYNOPKG_PKGVAR}/usr") | ||
|
||
if [ ! -f "${SYNOPKG_PKGVAR}/default.crt" ];then | ||
SERVICE_COMMAND+=" --tls-generate-cert" | ||
fi | ||
SERVICE_COMMAND+=" --server-username=${wizard_username} --server-password=${wizard_password}" | ||
} | ||
|
||
service_postinst () { | ||
if [ ! -f "${SYNOPKG_PKGVAR}/pwd" ]; then | ||
echo "${wizard_password}" > "${SYNOPKG_PKGVAR}/pwd" | ||
echo "${wizard_username}" > "${SYNOPKG_PKGVAR}/usr" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_username", | ||
"desc": "Web Username", | ||
"defaultValue": "kopia", | ||
"validator": { | ||
"allowBlank": false, | ||
"minLength": 1 | ||
} | ||
}, | ||
{ | ||
"key": "wizard_password", | ||
"desc": "Web Password", | ||
"defaultValue": "kopiakopia", | ||
"validator": { | ||
"allowBlank": false, | ||
"minLength": 8 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |