🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 0d155c70be
commit 32600acc60
14258 files changed
+3954570

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=cloudreve
PKG_VERSION:=4.14.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cloudreve/Cloudreve.git
PKG_SOURCE_VERSION:=95865add542f5b7ac0e774b3232ee01d72ea7daa
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/cloudreve/Cloudreve/v4
GO_PKG_LDFLAGS_X:= \
$(GO_PKG)/application/constants.BackendVersion=$(PKG_VERSION) \
$(GO_PKG)/application/constants.LastCommit=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/cloudreve
SECTION:=net
CATEGORY:=Network
SUBMENU:=Cloud Manager
TITLE:=A project helps you build your own cloud in minutes
URL:=https://cloudreve.org
DEPENDS:=@(aarch64||arm||i386||i686||riscv64||x86_64) +ca-bundle
endef
define Package/cloudreve/description
Self-deployed file management and sharing system, supports multiple
storage providers.
endef
define Build/Compile
( \
pushd $(PKG_BUILD_DIR)/assets ; \
yarn install ; \
yarn version --new-version $(PKG_VERSION) --no-git-tag-version ; \
yarn run build ; \
cd .. ; \
zip -r - assets/build > application/statics/assets.zip ; \
popd ; \
$(call GoPackage/Build/Compile) ; \
)
endef
define Package/cloudreve/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Cloudreve $(1)/usr/bin/cloudreve
endef
$(eval $(call GoBinPackage,cloudreve))
$(eval $(call BuildPackage,cloudreve))
+19
View File
@@ -0,0 +1,19 @@
--- a/application/migrator/model/init.go
+++ b/application/migrator/model/init.go
@@ -7,7 +7,6 @@ import (
"github.com/jinzhu/gorm"
"github.com/cloudreve/Cloudreve/v4/application/migrator/conf"
- "github.com/cloudreve/Cloudreve/v4/pkg/util"
_ "github.com/jinzhu/gorm/dialects/mssql"
_ "github.com/jinzhu/gorm/dialects/mysql"
_ "github.com/jinzhu/gorm/dialects/postgres"
@@ -37,7 +36,7 @@ func Init() error {
switch confDBType {
case "UNSET", "sqlite":
// 未指定数据库或者明确指定为 sqlite 时,使用 SQLite 数据库
- db, err = gorm.Open("sqlite3", util.RelativePath(conf.DatabaseConfig.DBFile))
+ db, err = gorm.Open("sqlite3", "/etc/cloudreve/" + conf.DatabaseConfig.DBFile)
case "postgres":
db, err = gorm.Open(confDBType, fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%d sslmode=disable",
conf.DatabaseConfig.Host,