Files
mostlymatter/limitless.patch
2026-04-22 16:21:28 +02:00

419 строки
18 KiB
Diff

diff --git a/server/.golangci.yml b/server/.golangci.yml
index e7b25ff604..7eb81a08a2 100644
--- a/server/.golangci.yml
+++ b/server/.golangci.yml
@@ -133,19 +133,19 @@ linters:
channels/store/storetest/scheme_store.go|\
channels/store/storetest/shared_channel_store.go|\
channels/store/storetest/team_store.go|\
channels/store/storetest/thread_store.go|\
channels/store/storetest/user_store.go|\
- cmd/mattermost/commands/cmdtestlib.go|\
- cmd/mattermost/commands/db.go|\
- cmd/mattermost/commands/export.go|\
- cmd/mattermost/commands/import.go|\
- cmd/mattermost/commands/jobserver.go|\
- cmd/mattermost/commands/server.go|\
- cmd/mattermost/commands/server_test.go|\
- cmd/mattermost/commands/test.go|\
- cmd/mattermost/commands/version.go|\
+ cmd/mostlymatter/commands/cmdtestlib.go|\
+ cmd/mostlymatter/commands/db.go|\
+ cmd/mostlymatter/commands/export.go|\
+ cmd/mostlymatter/commands/import.go|\
+ cmd/mostlymatter/commands/jobserver.go|\
+ cmd/mostlymatter/commands/server.go|\
+ cmd/mostlymatter/commands/server_test.go|\
+ cmd/mostlymatter/commands/test.go|\
+ cmd/mostlymatter/commands/version.go|\
platform/services/cache/lru_striped.go|\
platform/services/cache/lru_striped_bench_test.go|\
platform/services/cache/lru_striped_test.go|\
platform/services/cache/lru_test.go|\
platform/services/docextractor/combine.go|\
diff --git a/server/Makefile b/server/Makefile
index f44e976a09..aa2f7daee5 100644
--- a/server/Makefile
+++ b/server/Makefile
@@ -54,11 +54,11 @@ MMCTL_PKG = github.com/mattermost/mattermost/server/v8/cmd/mmctl/commands
MMCTL_BUILD_DATE = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
MMCTL_LDFLAGS += -X "$(MMCTL_PKG).buildDate=$(MMCTL_BUILD_DATE)"
# Enterprise
BUILD_ENTERPRISE_DIR ?= ../../enterprise
-BUILD_ENTERPRISE ?= true
+BUILD_ENTERPRISE ?= false
BUILD_ENTERPRISE_READY = false
BUILD_TYPE_NAME = team
BUILD_HASH_ENTERPRISE = none
ifneq ($(wildcard $(BUILD_ENTERPRISE_DIR)/.),)
MMCTL_TESTFLAGS += -ldflags '-X "$(MMCTL_PKG).EnableEnterpriseTests=true" -X "github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=true"'
@@ -121,20 +121,20 @@ GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update t
GO_COMPATIBILITY_TEST_VERSIONS := 1.22.7 1.23.6
# GOOS/GOARCH of the build host, used to determine whether we're cross-compiling or not
BUILDER_GOOS_GOARCH="$(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH)"
-PLATFORM_FILES="./cmd/mattermost"
+PLATFORM_FILES="./cmd/mostlymatter"
# Output paths
DIST_ROOT=dist
-DIST_PATH=$(DIST_ROOT)/mattermost
-DIST_PATH_LIN_AMD64=$(DIST_ROOT)/linux_amd64/mattermost
-DIST_PATH_LIN_ARM64=$(DIST_ROOT)/linux_arm64/mattermost
-DIST_PATH_OSX_AMD64=$(DIST_ROOT)/darwin_amd64/mattermost
-DIST_PATH_OSX_ARM64=$(DIST_ROOT)/darwin_arm64/mattermost
-DIST_PATH_WIN=$(DIST_ROOT)/windows/mattermost
+DIST_PATH=$(DIST_ROOT)/mostlymatter
+DIST_PATH_LIN_AMD64=$(DIST_ROOT)/linux_amd64/mostlymatter
+DIST_PATH_LIN_ARM64=$(DIST_ROOT)/linux_arm64/mostlymatter
+DIST_PATH_OSX_AMD64=$(DIST_ROOT)/darwin_amd64/mostlymatter
+DIST_PATH_OSX_ARM64=$(DIST_ROOT)/darwin_arm64/mostlymatter
+DIST_PATH_WIN=$(DIST_ROOT)/windows/mostlymatter
# Packages lists
TE_PACKAGES=$(shell $(GO) list ./public/...) $(shell $(GO) list ./... | grep -vE 'server/v8/cmd/mmctl')
MMCTL_PACKAGES=$(shell $(GO) list ./... | grep -E 'server/v8/cmd/mmctl')
@@ -728,11 +728,11 @@ clean: stop-docker ## Clean up everything except persistent server data.
rm -f cover.out
rm -f ecover.out
rm -f *.out
rm -f *.test
rm -f channels/imports/imports.go
- rm -f cmd/mattermost/cprofile*.out
+ rm -f cmd/mostlymatter/cprofile*.out
nuke: clean clean-docker ## Clean plus removes persistent server data.
@echo BOOM
rm -rf data
diff --git a/server/channels/app/limits.go b/server/channels/app/limits.go
index 7eccd87f3b..13b9c3ac3f 100644
--- a/server/channels/app/limits.go
+++ b/server/channels/app/limits.go
@@ -8,12 +8,12 @@ import (
"github.com/mattermost/mattermost/server/public/model"
)
const (
- maxUsersLimit = 2_500
- maxUsersHardLimit = 5_000
+ maxUsersLimit = 5_000_000
+ maxUsersHardLimit = 10_000_000
)
func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {
limits := &model.ServerLimits{}
license := a.License()
diff --git a/server/cmd/mattermost/commands/cmdtestlib.go b/server/cmd/mostlymatter/commands/cmdtestlib.go
similarity index 100%
rename from server/cmd/mattermost/commands/cmdtestlib.go
rename to server/cmd/mostlymatter/commands/cmdtestlib.go
diff --git a/server/cmd/mattermost/commands/db.go b/server/cmd/mostlymatter/commands/db.go
similarity index 97%
rename from server/cmd/mattermost/commands/db.go
rename to server/cmd/mostlymatter/commands/db.go
index 17c96c0c45..4a5c210479 100644
--- a/server/cmd/mattermost/commands/db.go
+++ b/server/cmd/mostlymatter/commands/db.go
@@ -32,25 +32,25 @@ var InitDbCmd = &cobra.Command{
Short: "Initialize the database",
Long: `Initialize the database for a given DSN, executing the migrations and loading the custom defaults if any.
This command should be run using a database configuration DSN.`,
Example: ` # you can use the config flag to pass the DSN
- $ mattermost db init --config postgres://localhost/mattermost
+ $ mostlymatter db init --config postgres://localhost/mattermost
# or you can use the MM_CONFIG environment variable
- $ MM_CONFIG=postgres://localhost/mattermost mattermost db init
+ $ MM_CONFIG=postgres://localhost/mattermost mostlymatter db init
# and you can set a custom defaults file to be loaded into the database
- $ MM_CUSTOM_DEFAULTS_PATH=custom.json MM_CONFIG=postgres://localhost/mattermost mattermost db init`,
+ $ MM_CUSTOM_DEFAULTS_PATH=custom.json MM_CONFIG=postgres://localhost/mattermost mostlymatter db init`,
Args: cobra.NoArgs,
RunE: initDbCmdF,
}
var ResetCmd = &cobra.Command{
Use: "reset",
Short: "Reset the database to initial state",
- Long: "Completely erases the database causing the loss of all data. This will reset Mattermost to its initial state.",
+ Long: "Completely erases the database causing the loss of all data. This will reset Mostlymatter to its initial state.",
RunE: resetCmdF,
}
var MigrateCmd = &cobra.Command{
Use: "migrate",
diff --git a/server/cmd/mattermost/commands/exec_command_test.go b/server/cmd/mostlymatter/commands/exec_command_test.go
similarity index 100%
rename from server/cmd/mattermost/commands/exec_command_test.go
rename to server/cmd/mostlymatter/commands/exec_command_test.go
diff --git a/server/cmd/mattermost/commands/export.go b/server/cmd/mostlymatter/commands/export.go
similarity index 92%
rename from server/cmd/mattermost/commands/export.go
rename to server/cmd/mostlymatter/commands/export.go
index ece6eebacf..bc9d31fe46 100644
--- a/server/cmd/mattermost/commands/export.go
+++ b/server/cmd/mostlymatter/commands/export.go
@@ -18,26 +18,26 @@ import (
"github.com/spf13/cobra"
)
var ExportCmd = &cobra.Command{
Use: "export",
- Short: "Export data from Mattermost",
- Long: "Export data from Mattermost in a format suitable for import into a third-party application or another Mattermost instance",
+ Short: "Export data from Mostlymatter",
+ Long: "Export data from Mostlymatter in a format suitable for import into a third-party application or another Mostlymatter instance",
}
var ScheduleExportCmd = &cobra.Command{
Use: "schedule",
- Short: "Schedule an export data job in Mattermost",
- Long: "Schedule an export data job in Mattermost (this will run asynchronously via a background worker)",
+ Short: "Schedule an export data job in Mostlymatter",
+ Long: "Schedule an export data job in Mostlymatter (this will run asynchronously via a background worker)",
Example: "export schedule --format=actiance --exportFrom=12345 --timeoutSeconds=12345",
RunE: scheduleExportCmdF,
}
var BulkExportCmd = &cobra.Command{
Use: "bulk [file]",
Short: "Export bulk data.",
- Long: "Export data to a file compatible with the Mattermost Bulk Import format.",
+ Long: "Export data to a file compatible with the Mostlymatter Bulk Import format.",
Example: "export bulk bulk_data.json",
RunE: bulkExportCmdF,
Args: cobra.ExactArgs(1),
}
diff --git a/server/cmd/mattermost/commands/import.go b/server/cmd/mostlymatter/commands/import.go
similarity index 98%
rename from server/cmd/mattermost/commands/import.go
rename to server/cmd/mostlymatter/commands/import.go
index 434403d830..d662c8af65 100644
--- a/server/cmd/mattermost/commands/import.go
+++ b/server/cmd/mostlymatter/commands/import.go
@@ -30,11 +30,11 @@ var SlackImportCmd = &cobra.Command{
}
var BulkImportCmd = &cobra.Command{
Use: "bulk [file]",
Short: "Import bulk data.",
- Long: "Import data from a Mattermost Bulk Import File.",
+ Long: "Import data from a Mostlymatter Bulk Import File.",
Example: " import bulk bulk_data.json",
RunE: bulkImportCmdF,
}
func init() {
diff --git a/server/cmd/mattermost/commands/init.go b/server/cmd/mostlymatter/commands/init.go
similarity index 100%
rename from server/cmd/mattermost/commands/init.go
rename to server/cmd/mostlymatter/commands/init.go
diff --git a/server/cmd/mattermost/commands/jobserver.go b/server/cmd/mostlymatter/commands/jobserver.go
similarity index 88%
rename from server/cmd/mattermost/commands/jobserver.go
rename to server/cmd/mostlymatter/commands/jobserver.go
index 60b570bea6..5ab12fc0cb 100644
--- a/server/cmd/mattermost/commands/jobserver.go
+++ b/server/cmd/mostlymatter/commands/jobserver.go
@@ -16,11 +16,11 @@ import (
"github.com/mattermost/mattermost/server/v8/config"
)
var JobserverCmd = &cobra.Command{
Use: "jobserver",
- Short: "Start the Mattermost job server",
+ Short: "Start the Mostlymatter job server",
RunE: jobserverCmdF,
}
func init() {
JobserverCmd.Flags().Bool("nojobs", false, "Do not run jobs on this jobserver.")
@@ -44,12 +44,12 @@ func jobserverCmdF(command *cobra.Command, args []string) error {
a.Srv().LoadLicense()
rctx := request.EmptyContext(a.Log())
// Run jobs
- rctx.Logger().Info("Starting Mattermost job server")
- defer rctx.Logger().Info("Stopped Mattermost job server")
+ rctx.Logger().Info("Starting Mostlymatter job server")
+ defer rctx.Logger().Info("Stopped Mostlymatter job server")
if !noJobs {
a.Srv().Jobs.StartWorkers()
defer a.Srv().Jobs.StopWorkers()
}
@@ -66,9 +66,9 @@ func jobserverCmdF(command *cobra.Command, args []string) error {
signalChan := make(chan os.Signal, 1)
signal.Notify(signalChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
<-signalChan
// Cleanup anything that isn't handled by a defer statement
- rctx.Logger().Info("Stopping Mattermost job server")
+ rctx.Logger().Info("Stopping Mostlymatter job server")
return nil
}
diff --git a/server/cmd/mattermost/commands/main_test.go b/server/cmd/mostlymatter/commands/main_test.go
similarity index 100%
rename from server/cmd/mattermost/commands/main_test.go
rename to server/cmd/mostlymatter/commands/main_test.go
diff --git a/server/cmd/mattermost/commands/output.go b/server/cmd/mostlymatter/commands/output.go
similarity index 100%
rename from server/cmd/mattermost/commands/output.go
rename to server/cmd/mostlymatter/commands/output.go
diff --git a/server/cmd/mattermost/commands/root.go b/server/cmd/mostlymatter/commands/root.go
similarity index 70%
rename from server/cmd/mattermost/commands/root.go
rename to server/cmd/mostlymatter/commands/root.go
index 692ac30f53..8d2081ab21 100644
--- a/server/cmd/mattermost/commands/root.go
+++ b/server/cmd/mostlymatter/commands/root.go
@@ -16,13 +16,13 @@ func Run(args []string) error {
RootCmd.SetArgs(args)
return RootCmd.Execute()
}
var RootCmd = &cobra.Command{
- Use: "mattermost",
+ Use: "mostlymatter",
Short: "Open source, self-hosted Slack-alternative",
- Long: `Mattermost offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com`,
+ Long: `Mostlymatter offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
checkForRootUser()
},
}
@@ -31,8 +31,8 @@ func init() {
}
// checkForRootUser logs a warning if the process is running as root
func checkForRootUser() {
if os.Geteuid() == 0 {
- mlog.Warn("Running Mattermost as root is not recommended. Please use a non-root user.")
+ mlog.Warn("Running Mostlymatter as root is not recommended. Please use a non-root user.")
}
}
diff --git a/server/cmd/mattermost/commands/server.go b/server/cmd/mostlymatter/commands/server.go
similarity index 96%
rename from server/cmd/mattermost/commands/server.go
rename to server/cmd/mostlymatter/commands/server.go
index 76d33bfaf3..0100abc12a 100644
--- a/server/cmd/mattermost/commands/server.go
+++ b/server/cmd/mostlymatter/commands/server.go
@@ -24,11 +24,11 @@ import (
"github.com/mattermost/mattermost/server/v8/config"
)
var serverCmd = &cobra.Command{
Use: "server",
- Short: "Run the Mattermost server",
+ Short: "Run the Mostlymatter server",
RunE: serverCmdF,
SilenceUsage: true,
}
func init() {
@@ -38,11 +38,11 @@ func init() {
func serverCmdF(command *cobra.Command, args []string) error {
interruptChan := make(chan os.Signal, 1)
if err := utils.TranslationsPreInit(); err != nil {
- return errors.Wrap(err, "unable to load Mattermost translation files")
+ return errors.Wrap(err, "unable to load Mostlymatter translation files")
}
customDefaults, err := loadCustomDefaults()
if err != nil {
mlog.Warn("Error loading custom configuration defaults: " + err.Error())
diff --git a/server/cmd/mattermost/commands/server_test.go b/server/cmd/mostlymatter/commands/server_test.go
similarity index 100%
rename from server/cmd/mattermost/commands/server_test.go
rename to server/cmd/mostlymatter/commands/server_test.go
diff --git a/server/cmd/mattermost/commands/test.go b/server/cmd/mostlymatter/commands/test.go
similarity index 100%
rename from server/cmd/mattermost/commands/test.go
rename to server/cmd/mostlymatter/commands/test.go
diff --git a/server/cmd/mattermost/commands/utils.go b/server/cmd/mostlymatter/commands/utils.go
similarity index 100%
rename from server/cmd/mattermost/commands/utils.go
rename to server/cmd/mostlymatter/commands/utils.go
diff --git a/server/cmd/mattermost/commands/utils_test.go b/server/cmd/mostlymatter/commands/utils_test.go
similarity index 100%
rename from server/cmd/mattermost/commands/utils_test.go
rename to server/cmd/mostlymatter/commands/utils_test.go
diff --git a/server/cmd/mattermost/commands/version.go b/server/cmd/mostlymatter/commands/version.go
similarity index 92%
rename from server/cmd/mattermost/commands/version.go
rename to server/cmd/mostlymatter/commands/version.go
index 5a5a5f160d..b0c0dc11ff 100644
--- a/server/cmd/mattermost/commands/version.go
+++ b/server/cmd/mostlymatter/commands/version.go
@@ -14,11 +14,11 @@ var VersionCmd = &cobra.Command{
Short: "Display version information",
RunE: versionCmdF,
}
func init() {
- VersionCmd.Flags().Bool("skip-server-start", false, "Skip the server initialization and return the Mattermost version without the DB version.")
+ VersionCmd.Flags().Bool("skip-server-start", false, "Skip the server initialization and return the Mostlymatter version without the DB version.")
VersionCmd.Flags().MarkDeprecated("skip-server-start", "This flag is not necessary anymore and the flag will be removed in the future releases. Consider removing it from your scripts.")
RootCmd.AddCommand(VersionCmd)
}
func versionCmdF(command *cobra.Command, args []string) error {
diff --git a/server/cmd/mattermost/commands/version_test.go b/server/cmd/mostlymatter/commands/version_test.go
similarity index 100%
rename from server/cmd/mattermost/commands/version_test.go
rename to server/cmd/mostlymatter/commands/version_test.go
diff --git a/server/cmd/mattermost/main.go b/server/cmd/mostlymatter/main.go
similarity index 88%
rename from server/cmd/mattermost/main.go
rename to server/cmd/mostlymatter/main.go
index 5fb4b4a005..1783e812f3 100644
--- a/server/cmd/mattermost/main.go
+++ b/server/cmd/mostlymatter/main.go
@@ -4,11 +4,11 @@
package main
import (
"os"
- "github.com/mattermost/mattermost/server/v8/cmd/mattermost/commands"
+ "github.com/mattermost/mattermost/server/v8/cmd/mostlymatter/commands"
// Import and register app layer slash commands
_ "github.com/mattermost/mattermost/server/v8/channels/app/slashcommands"
// Plugins
_ "github.com/mattermost/mattermost/server/v8/channels/app/oauthproviders/gitlab"
diff --git a/server/cmd/mattermost/main_test.go b/server/cmd/mostlymatter/main_test.go
similarity index 96%
rename from server/cmd/mattermost/main_test.go
rename to server/cmd/mostlymatter/main_test.go
index 8ec8a0bea4..c661c2012c 100644
--- a/server/cmd/mattermost/main_test.go
+++ b/server/cmd/mostlymatter/main_test.go
@@ -10,11 +10,11 @@ import (
"testing"
)
// TestRunMain can be used to track code coverage in integration tests.
// To run this:
-// go test -coverpkg="<>" -ldflags '<>' -tags maincoverage -c ./cmd/mattermost/
+// go test -coverpkg="<>" -ldflags '<>' -tags maincoverage -c ./cmd/mostlymatter/
// ./mattermost.test -test.run="^TestRunMain$" -test.coverprofile=coverage.out
// And then run your integration tests.
func TestRunMain(t *testing.T) {
main()
}