Initial commit
This commit is contained in:
commit
a216814c30
5 changed files with 351 additions and 0 deletions
74
.forgejo/workflows/release-build.yaml
Normal file
74
.forgejo/workflows/release-build.yaml
Normal file
|
@ -0,0 +1,74 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release-build:
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
env:
|
||||
pkgver: 8.1.1
|
||||
buildno: 39
|
||||
qtver: 5.15.3
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: |
|
||||
cat /etc/os-release
|
||||
apt-get update
|
||||
apt-get install -y git make g++ bzip2 sudo patch python2 curl lsb-release p7zip-full qtbase5-dev debhelper
|
||||
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
apt-get install -y nodejs
|
||||
npm install -g pkg grunt grunt-cli
|
||||
- name: Getting patches
|
||||
uses: actions/checkout@v4
|
||||
- name: Fetching sources
|
||||
run: |
|
||||
git clone https://github.com/ONLYOFFICE/DocumentServer --recursive -b v$pkgver build
|
||||
git clone https://github.com/ONLYOFFICE/build_tools.git -b v$pkgver.$buildno build/build_tools
|
||||
git clone https://github.com/ONLYOFFICE/document-server-integration -b v$pkgver.$buildno build/document-server-integration
|
||||
git clone https://github.com/ONLYOFFICE/document-templates -b v$pkgver.$buildno build/document-templates
|
||||
git clone https://github.com/ONLYOFFICE/onlyoffice.github.io build/onlyoffice.github.io
|
||||
git clone https://github.com/ONLYOFFICE/document-server-package.git -b v$pkgver.$buildno build/document-server-package
|
||||
- name: Applying patches
|
||||
run: |
|
||||
git -C build/server apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/server.patch
|
||||
git -C build/web-apps apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/web-apps.patch
|
||||
git -C build apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/core_v8-no-enum-constexrp-conversion.patch
|
||||
- name: Development setup
|
||||
run: |
|
||||
mkdir -p build/build_tools/system_qt-$qtver/gcc_64
|
||||
ln -s /usr/lib/x86_64-linux-gnu build/build_tools/system_qt-$qtver/gcc_64/lib
|
||||
ln -s /usr/lib/x86_64-linux-gnu/qt5/bin build/build_tools/system_qt-$qtver/gcc_64/bin
|
||||
ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins build/build_tools/system_qt-$qtver/gcc_64/plugins
|
||||
cd build/build_tools/tools/linux
|
||||
python2 ./deps.py
|
||||
- name: Build server
|
||||
run: |
|
||||
cd build/build_tools
|
||||
python2 ./configure.py --update 0 --module "server" --qt-dir $(pwd)/system_qt-$qtver
|
||||
python2 ./make.py
|
||||
- name: Build package
|
||||
run: |
|
||||
cd build/document-server-package
|
||||
PRODUCT_VERSION=$pkgver BUILD_NUMBER=$buildno make deb
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
with:
|
||||
name: documentserver-deb
|
||||
path: build/document-server-package/deb/onlyoffice-documentserver_*.deb
|
||||
release-deploy:
|
||||
needs: [release-build]
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:latest
|
||||
steps:
|
||||
- name: Setting up environment
|
||||
run: apk add nodejs curl
|
||||
- name: Package download
|
||||
uses: forgejo/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: curl --user ${{ vars.FORGE_REPO_USER }}:${{ secrets.FORGE_REPO_PRIVKEY }} --upload-file */onlyoffice-documentserver_*.deb https://forge.ilot.io/api/packages/ilot/debian/pool/jammy/main/upload
|
||||
|
||||
|
61
.forgejo/workflows/test-build.yaml
Normal file
61
.forgejo/workflows/test-build.yaml
Normal file
|
@ -0,0 +1,61 @@
|
|||
on:
|
||||
pull_request:
|
||||
types: [ assigned, opened, synchronize, reopened ]
|
||||
|
||||
jobs:
|
||||
test-build:
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
env:
|
||||
pkgver: 8.1.1
|
||||
buildno: 39
|
||||
qtver: 5.15.3
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: |
|
||||
cat /etc/os-release
|
||||
apt-get update
|
||||
apt-get install -y git make g++ bzip2 sudo patch python2 curl lsb-release p7zip-full qtbase5-dev debhelper
|
||||
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
apt-get install -y nodejs
|
||||
npm install -g pkg grunt grunt-cli
|
||||
- name: Getting patches
|
||||
uses: actions/checkout@v4
|
||||
- name: Fetching sources
|
||||
run: |
|
||||
git clone https://github.com/ONLYOFFICE/DocumentServer --recursive -b v$pkgver build
|
||||
git clone https://github.com/ONLYOFFICE/build_tools.git -b v$pkgver.$buildno build/build_tools
|
||||
git clone https://github.com/ONLYOFFICE/document-server-integration -b v$pkgver.$buildno build/document-server-integration
|
||||
git clone https://github.com/ONLYOFFICE/document-templates -b v$pkgver.$buildno build/document-templates
|
||||
git clone https://github.com/ONLYOFFICE/onlyoffice.github.io build/onlyoffice.github.io
|
||||
git clone https://github.com/ONLYOFFICE/document-server-package.git -b v$pkgver.$buildno build/document-server-package
|
||||
- name: Applying patches
|
||||
run: |
|
||||
git -C build/server apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/server.patch
|
||||
git -C build/web-apps apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/web-apps.patch
|
||||
git -C build apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/core_v8-no-enum-constexrp-conversion.patch
|
||||
- name: Development setup
|
||||
run: |
|
||||
mkdir -p build/build_tools/system_qt-$qtver/gcc_64
|
||||
ln -s /usr/lib/x86_64-linux-gnu build/build_tools/system_qt-$qtver/gcc_64/lib
|
||||
ln -s /usr/lib/x86_64-linux-gnu/qt5/bin build/build_tools/system_qt-$qtver/gcc_64/bin
|
||||
ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins build/build_tools/system_qt-$qtver/gcc_64/plugins
|
||||
cd build/build_tools/tools/linux
|
||||
python2 ./deps.py
|
||||
- name: Build server
|
||||
run: |
|
||||
cd build/build_tools
|
||||
python2 ./configure.py --update 0 --module "server" --qt-dir $(pwd)/system_qt-$qtver
|
||||
python2 ./make.py
|
||||
- name: Build package
|
||||
run: |
|
||||
cd build/document-server-package
|
||||
PRODUCT_VERSION=$pkgver BUILD_NUMBER=$buildno make deb
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
with:
|
||||
name: documentserver-deb
|
||||
path: build/document-server-package/deb/onlyoffice-documentserver_*.deb
|
||||
|
||||
|
22
README.md
Normal file
22
README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# onlyoffice-document-server
|
||||
Upstream: https://forge.ilot.io/ilot/onlyoffice-document-server
|
||||
|
||||
## Description
|
||||
|
||||
This repository contains the necessary workflows to build onlyoffice-document-server
|
||||
from source, and produce a usable Debian package. The build process also allows
|
||||
introducing patches for ilot's application.
|
||||
|
||||
## How to use
|
||||
|
||||
Follow the instruction the guide on [OnlyOffice's docs](https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx).
|
||||
Instead of adding their repository, use ilot's by following the instructions [here](https://forge.ilot.io/ilot/-/packages/debian/onlyoffice-documentserver)
|
||||
|
||||
## Support
|
||||
|
||||
As these aports are built for ilot's own application, we make no guarantees that
|
||||
they will work for you.
|
||||
|
||||
## License
|
||||
This readme, workflows and support scripts are licensed under MIT License.
|
||||
|
34
core_v8-no-enum-constexrp-conversion.patch
Normal file
34
core_v8-no-enum-constexrp-conversion.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff --git a/core/Common/3dParty/v8/tools/no-enum-constexrp-conversion.patch b/core/Common/3dParty/v8/tools/no-enum-constexrp-conversion.patch
|
||||
new file mode 100644
|
||||
index 0000000000..5a1a8067a6
|
||||
--- /dev/null
|
||||
+++ b/core/Common/3dParty/v8/tools/no-enum-constexrp-conversion.patch
|
||||
@@ -0,0 +1,14 @@
|
||||
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
+index 5ea2f213..29fa7742 100644
|
||||
+--- a/build/config/compiler/BUILD.gn
|
||||
++++ b/build/config/compiler/BUILD.gn
|
||||
+@@ -1548,6 +1548,9 @@ config("default_warnings") {
|
||||
+ # TODO(https://crbug.com/989932): Evaluate and possibly enable.
|
||||
+ "-Wno-implicit-int-float-conversion",
|
||||
+
|
||||
++ "-Wno-enum-constexpr-conversion",
|
||||
++
|
||||
++
|
||||
+ # TODO(https://crbug.com/999886): Clean up, enable.
|
||||
+ "-Wno-final-dtor-non-final-class",
|
||||
+
|
||||
diff --git a/build_tools/scripts/core_common/modules/v8_89.py b/core/build_tools/core_common/modules/v8_89.py
|
||||
index 9643263..35ee1fe 100644
|
||||
--- a/build_tools/scripts/core_common/modules/v8_89.py
|
||||
+++ b/build_tools/scripts/core_common/modules/v8_89.py
|
||||
@@ -150,6 +150,8 @@ def make():
|
||||
"use_custom_libcxx=false",
|
||||
"treat_warnings_as_errors=false"]
|
||||
|
||||
+ base.cmd("patch", ["-p1", "-i", "../../v8/tools/no-enum-constexrp-conversion.patch"])
|
||||
+
|
||||
if config.check_option("platform", "linux_64"):
|
||||
base.cmd2("gn", ["gen", "out.gn/linux_64", make_args(gn_args, "linux")])
|
||||
base.cmd("ninja", ["-C", "out.gn/linux_64"])
|
||||
|
160
disable-licensing-limits.patch
Normal file
160
disable-licensing-limits.patch
Normal file
|
@ -0,0 +1,160 @@
|
|||
From 5ee269eef8bd02d066151deaa4d8c0fe6b6cbce4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/xbeeant/onlyoffice-ce-docker-license
|
||||
From: xbeeant
|
||||
Date: Tue, 15 Nov 2022 01:04:46 -0500
|
||||
Subject: onlyoffice-ce-docker-license
|
||||
|
||||
This patches OnlyOffice Docs server with mobile editing enabled in the
|
||||
Nextcloud apps for an unlimited amount of concurrent users.
|
||||
|
||||
Background: Just about two months after Nextcloud released their partnership
|
||||
with Ascensio and featured a community version of OnlyOffice, the latter
|
||||
decided to remove support for mobile editing of documents. This affected the
|
||||
Nextcloud app, killing a feature that was previously marketed by both
|
||||
companies.
|
||||
|
||||
The changes were executed without any prior notice and alienated quite a lot of
|
||||
home users, who would now be forced to pay more than €1.000 to unlock that
|
||||
previously free feature. Only after some outcries Ascensio deigned to release a
|
||||
statement and a new, albeit "limited", offer of €90 for home servers. This
|
||||
offer has since expired and their licensing tier suggests current licenses are
|
||||
valid for one year, starting at about €140.
|
||||
|
||||
In my opinion these deceptive practices of advertising a feature only to take
|
||||
it away are unacceptable for a company presenting itself and their products as
|
||||
open source.
|
||||
|
||||
---
|
||||
|
||||
diff --git a/server/Common/sources/constants.js b/server/Common/sources/constants.js
|
||||
index 3e8e7aaa..aad4d05f 100644
|
||||
--- a/server/Common/sources/constants.js
|
||||
+++ b/server/Common/sources/constants.js
|
||||
@@ -85,8 +85,8 @@ exports.LICENSE_RESULT = {
|
||||
NotBefore: 16
|
||||
};
|
||||
|
||||
-exports.LICENSE_CONNECTIONS = 20;
|
||||
-exports.LICENSE_USERS = 3;
|
||||
+exports.LICENSE_CONNECTIONS = 999999;
|
||||
+exports.LICENSE_USERS = 999999;
|
||||
exports.LICENSE_EXPIRE_USERS_ONE_DAY = 24 * 60 * 60; // day in seconds
|
||||
|
||||
exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000;
|
||||
diff --git a/server/Common/sources/license.js b/server/Common/sources/license.js
|
||||
index 5df8d693..3fd9de14 100644
|
||||
--- a/server/Common/sources/license.js
|
||||
+++ b/server/Common/sources/license.js
|
||||
@@ -45,24 +45,24 @@ exports.readLicense = function*() {
|
||||
count: 1,
|
||||
type: c_LR.Success,
|
||||
light: false,
|
||||
- packageType: constants.PACKAGE_TYPE_OS,
|
||||
+ packageType: constants.PACKAGE_TYPE_I,
|
||||
mode: constants.LICENSE_MODE.None,
|
||||
- branding: false,
|
||||
+ branding: true,
|
||||
connections: constants.LICENSE_CONNECTIONS,
|
||||
connectionsView: constants.LICENSE_CONNECTIONS,
|
||||
- customization: false,
|
||||
- advancedApi: false,
|
||||
- usersCount: 0,
|
||||
- usersViewCount: 0,
|
||||
+ customization: true,
|
||||
+ advancedApi: true,
|
||||
+ usersCount: constants.LICENSE_CONNECTIONS,
|
||||
+ usersViewCount: constants.LICENSE_CONNECTIONS,
|
||||
usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
||||
- hasLicense: false,
|
||||
- plugins: false,
|
||||
+ hasLicense: true,
|
||||
+ plugins: true,
|
||||
buildDate: oBuildDate,
|
||||
startDate: startDate,
|
||||
- endDate: null,
|
||||
+ endDate: new Date("2099-01-01T23:59:59.000Z"),
|
||||
customerId: "",
|
||||
- alias: ""
|
||||
+ alias: "community"
|
||||
}, null];
|
||||
};
|
||||
|
||||
-exports.packageType = constants.PACKAGE_TYPE_OS;
|
||||
+exports.packageType = constants.PACKAGE_TYPE_I;
|
||||
diff --git a/server/DocService/sources/server.js b/server/DocService/sources/server.js
|
||||
index 76303af9..9d2e6888 100644
|
||||
--- a/server/DocService/sources/server.js
|
||||
+++ b/server/DocService/sources/server.js
|
||||
@@ -129,7 +129,7 @@ if (!(cfgTokenEnableBrowser && cfgTokenEnableRequestInbox && cfgTokenEnableReque
|
||||
}
|
||||
|
||||
updateLicense();
|
||||
-fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
+// fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
setInterval(updateLicense, 86400000);
|
||||
|
||||
try {
|
||||
|
||||
diff --git a/server/FileConverter/sources/convertermaster.js b/server/FileConverter/sources/convertermaster.js
|
||||
index 46615032..6ce2d3e6 100644
|
||||
--- a/server/FileConverter/sources/convertermaster.js
|
||||
+++ b/server/FileConverter/sources/convertermaster.js
|
||||
@@ -92,7 +92,7 @@ if (cluster.isMaster) {
|
||||
|
||||
updateLicense();
|
||||
|
||||
- fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
+ // fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
setInterval(updateLicense, 86400000);
|
||||
} else {
|
||||
const converter = require('./converter');
|
||||
diff --git a/server/Makefile b/server/Makefile
|
||||
index e8e1308f..23f7e2ef 100644
|
||||
--- a/server/Makefile
|
||||
+++ b/server/Makefile
|
||||
@@ -87,7 +87,7 @@ DEBUG = $(BRANDING_DIR)/debug.js
|
||||
.PHONY: all clean install uninstall build-date
|
||||
|
||||
.NOTPARALLEL:
|
||||
-all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(DOCUMENT_TEMPLATES) $(LICENSE) $(WELCOME) $(INFO) build-date
|
||||
+all: $(SCHEMA) $(LICENSE) $(WELCOME) $(INFO) build-date
|
||||
|
||||
build-date: $(GRUNT_FILES)
|
||||
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
|
||||
diff --git a/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx b/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
index 963aca451..1ee48e856 100644
|
||||
--- a/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
@@ -4,7 +4,7 @@ const EditorUIController = () => {
|
||||
};
|
||||
|
||||
EditorUIController.isSupportEditFeature = () => {
|
||||
- return false
|
||||
+ return true
|
||||
};
|
||||
|
||||
EditorUIController.getToolbarOptions = () => {
|
||||
diff --git a/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx b/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx
|
||||
index ec7b37a2c..bfd879583 100644
|
||||
--- a/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
const EditorUIController = () => null;
|
||||
|
||||
-EditorUIController.isSupportEditFeature = () => false;
|
||||
+EditorUIController.isSupportEditFeature = () => true;
|
||||
|
||||
export default EditorUIController;
|
||||
diff --git a/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx b/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
index ec7b37a2c..bfd879583 100644
|
||||
--- a/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
const EditorUIController = () => null;
|
||||
|
||||
-EditorUIController.isSupportEditFeature = () => false;
|
||||
+EditorUIController.isSupportEditFeature = () => true;
|
||||
|
||||
export default EditorUIController;
|
Loading…
Add table
Reference in a new issue