1 Commits

Author SHA1 Message Date
Alexander Hofbauer
08dfcb4fc0 6.2.1.24 2021-04-06 12:33:45 +02:00
5 changed files with 94 additions and 1724 deletions

View File

@@ -1,30 +0,0 @@
name: Docker Image CI
on:
push:
branches: [ main ]
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set version
id: version
run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/}
- name: Build Docker image
run: |
echo Building version ${{ steps.version.outputs.release_version }}...
docker build . --file Dockerfile --tag alehoho/oo-ce-docker-license:${{ steps.version.outputs.release_version }}
- name: Push Docker image
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push alehoho/oo-ce-docker-license:${{ steps.version.outputs.release_version }}

View File

@@ -1,11 +1,9 @@
ARG product_version=6.3.1
ARG build_number=32
## Build stage
ARG product_version=6.2.1
ARG build_number=24
ARG oo_root='/var/www/onlyoffice/documentserver'
## Setup
FROM onlyoffice/documentserver:${product_version}.${build_number} as setup-stage
FROM onlyoffice/documentserver:${product_version}.${build_number} as build-stage
ARG product_version
ARG build_number
ARG oo_root
@@ -13,56 +11,56 @@ ARG oo_root
ENV PRODUCT_VERSION=${product_version}
ENV BUILD_NUMBER=${build_number}
# Mobile apps patching
ARG me_search='isSupportEditFeature:function(){return!1}'
ARG me_patch='s/isSupportEditFeature:function(){return!1}/isSupportEditFeature:function(){return true}/g'
RUN grep -q "${me_search}" ${oo_root}/web-apps/apps/documenteditor/mobile/app.js \
&& sed -si "${me_patch}" ${oo_root}/web-apps/apps/documenteditor/mobile/app.js
RUN grep -q "${me_search}" ${oo_root}/web-apps/apps/presentationeditor/mobile/app.js \
&& sed -si "${me_patch}" ${oo_root}/web-apps/apps/presentationeditor/mobile/app.js
RUN grep -q "${me_search}" ${oo_root}/web-apps/apps/spreadsheeteditor/mobile/app.js \
&& sed -si "${me_patch}" ${oo_root}/web-apps/apps/spreadsheeteditor/mobile/app.js
# Rebuild with license checks replaced
ARG build_deps="git make g++ nodejs npm"
RUN apt-get update && apt-get install -y ${build_deps}
ARG tag=v${product_version}.${build_number}
RUN mkdir /build \
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/build_tools.git /build/build_tools \
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/server.git /build/server
WORKDIR /build/server
RUN npm install -g pkg grunt grunt-cli
WORKDIR /build
COPY license.patch /build/
RUN git apply /build/license.patch
RUN make \
&& pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/FileConverter --targets=node10-linux -o /build/converter \
&& pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/DocService --targets=node10-linux --options max_old_space_size=4096 -o /build/docservice \
&& cp /build/converter ${oo_root}/server/FileConverter/converter \
&& cp /build/docservice ${oo_root}/server/DocService/docservice
## Clone
FROM setup-stage as clone-stage
ARG tag=v${PRODUCT_VERSION}.${BUILD_NUMBER}
RUN git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/build_tools.git /build/build_tools
RUN git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/sdkjs.git /build/sdkjs
RUN git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/web-apps.git /build/web-apps
RUN git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/server.git /build/server
COPY server.patch /build/
COPY web-apps.patch /build/
RUN cd /build/server && git apply /build/server.patch
RUN cd /build/web-apps && git apply /build/web-apps.patch
## Build
FROM clone-stage as build-stage
# build server with license checks patched
WORKDIR /build/server
RUN make
RUN pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/FileConverter --targets=node10-linux -o /build/converter
RUN pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/DocService --targets=node10-linux --options max_old_space_size=4096 -o /build/docservice
# build web-apps with mobile editing
WORKDIR /build/web-apps/build
RUN npm install
RUN grunt
## Final image
## Prod image
FROM onlyoffice/documentserver:${product_version}.${build_number}
ARG oo_root
# server
COPY --from=build-stage /build/converter ${oo_root}/server/FileConverter/converter
COPY --from=build-stage /build/docservice ${oo_root}/server/DocService/docservice
COPY --from=build-stage ${oo_root}/web-apps/apps/documenteditor/mobile/app.js \
${oo_root}/web-apps/apps/documenteditor/mobile/app.js
COPY --from=build-stage ${oo_root}/web-apps/apps/presentationeditor/mobile/app.js \
${oo_root}/web-apps/apps/presentationeditor/mobile/app.js
COPY --from=build-stage ${oo_root}/web-apps/apps/spreadsheeteditor/mobile/app.js \
${oo_root}/web-apps/apps/spreadsheeteditor/mobile/app.js
# web-apps
COPY --from=build-stage /build/web-apps/deploy/web-apps/apps/documenteditor/mobile/app.js ${oo_root}/web-apps/apps/documenteditor/mobile/app.js
COPY --from=build-stage /build/web-apps/deploy/web-apps/apps/presentationeditor/mobile/app.js ${oo_root}/web-apps/apps/presentationeditor/mobile/app.js
COPY --from=build-stage /build/web-apps/deploy/web-apps/apps/spreadsheeteditor/mobile/app.js ${oo_root}/web-apps/apps/spreadsheeteditor/mobile/app.js
COPY --from=build-stage ${oo_root}/server/FileConverter/converter \
${oo_root}/server/FileConverter/converter
COPY --from=build-stage ${oo_root}/server/DocService/docservice \
${oo_root}/server/DocService/docservice

View File

@@ -1,39 +1,8 @@
# Patched ONLYOFFICE Docs (Community Edition)
[![Docker Image CI](https://github.com/aleho/onlyoffice-ce-docker-license/actions/workflows/docker-image.yml/badge.svg)](https://github.com/aleho/onlyoffice-ce-docker-license/actions/workflows/docker-image.yml)
## Features
This [Dockerfile](./Dockerfile) and patches compile a version of
OnlyOffice Docs server with mobile editing enabled in the Nextcloud apps for an
unlimited amount of concurrent users.
It can be integrated into e.g. Nextcloud or ownCloud like the official images.
## Background
Just about two months after [Nextcloud released their partnership with Ascensio](https://nextcloud.com/blog/onlyoffice-and-nextcloud-partnering-up/)
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.
# OnlyOffice Community server with license
## Usage
Please refer the the official docs on how to integrate OnlyOffice into your
setup.
### Podman CLI
```sh
@@ -62,16 +31,9 @@ services:
container_name: onlyoffice
image: alehoho/oo-ce-docker-license
ports:
- "80:80"
- "80"
```
### Verify
To verify that the container is running successfully open
`[server-url]/healthcheck` (has to return `true`) and for the version number open
`[server-url]/index.html` and check the output of that page or
`[server-url]/web-apps/apps/api/documents/api.js` and check the header comment.
## Build
@@ -104,6 +66,26 @@ services:
```
### Verify
To verify that the container is running successfully open
`[server-url]/healthcheck` (has to return `true`) and for the version number open
`[server-url]/web-apps/apps/api/documents/api.js` and check the header comment.
## Background
Recently, just about a month after Nextcloud announced their partnership with
Ascensio and featuring a community version of OnlyOffice, the latter decided
to remove support for mobile editing of documents via the Nextcloud app.
This happened 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.
In my opinion these deceptive practices are unacceptable for a company
advertising itself and their product as open source.
## Thanks

View File

@@ -1,35 +1,35 @@
From 03a3990e83a94666abb5a27447fa1b67076b0e08 Mon Sep 17 00:00:00 2001
From 4782f11ba230f0e75fd3784ddc1d24f763f0a689 Mon Sep 17 00:00:00 2001
From: Alexander Hofbauer <alex@derhofbauer.at>
Date: Fri, 21 May 2021 10:35:05 +0200
Date: Sun, 27 Dec 2020 21:49:37 +0100
Subject: [PATCH] Patch for license
---
Common/sources/commondefines.js | 4 ++--
Common/sources/constants.js | 2 +-
Common/sources/license.js | 16 ++++++++--------
DocService/sources/DocsCoServer.js | 4 ++--
DocService/sources/DocsCoServer.js | 5 +++--
DocService/sources/server.js | 1 -
FileConverter/sources/convertermaster.js | 1 -
Makefile | 2 +-
7 files changed, 14 insertions(+), 16 deletions(-)
7 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/Common/sources/commondefines.js b/Common/sources/commondefines.js
index ec6a870..d1f21c2 100644
index 2a38911..d7d15b9 100644
--- a/Common/sources/commondefines.js
+++ b/Common/sources/commondefines.js
@@ -1035,8 +1035,8 @@ const c_oAscUnlockRes = {
@@ -992,8 +992,8 @@ const c_oAscUnlockRes = {
Empty: 2
};
-const buildVersion = '4.1.2';
-const buildNumber = 37;
+const buildVersion = '6.3.1';
+const buildNumber = 32;
+const buildVersion = '6.2.1';
+const buildNumber = 24;
exports.TaskQueueData = TaskQueueData;
exports.CMailMergeSendData = CMailMergeSendData;
diff --git a/Common/sources/constants.js b/Common/sources/constants.js
index f976ed9..e5b91fd 100644
index 2b79e02..738df37 100644
--- a/Common/sources/constants.js
+++ b/Common/sources/constants.js
@@ -70,7 +70,7 @@ exports.LICENSE_RESULT = {
@@ -42,7 +42,7 @@ index f976ed9..e5b91fd 100644
exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000;
diff --git a/Common/sources/license.js b/Common/sources/license.js
index ea257bd..5aefbf1 100644
index 19f0b61..0f18368 100644
--- a/Common/sources/license.js
+++ b/Common/sources/license.js
@@ -34,7 +34,7 @@
@@ -50,11 +50,11 @@ index ea257bd..5aefbf1 100644
const constants = require('./constants');
-const buildDate = '6/29/2016';
+const buildDate = '2021-06-06T14:34:00.000Z';
+const buildDate = '2021-03-31T14:14:00.000Z';
const oBuildDate = new Date(buildDate);
exports.readLicense = function*() {
@@ -43,18 +43,18 @@ exports.readLicense = function*() {
@@ -43,17 +43,17 @@ exports.readLicense = function*() {
count: 1,
type: c_LR.Success,
light: false,
@@ -77,23 +77,30 @@ index ea257bd..5aefbf1 100644
+ endDate: "2099-01-01T23:59:59.000Z"
};
};
-exports.packageType = constants.PACKAGE_TYPE_OS;
+exports.packageType = constants.PACKAGE_TYPE_I;
diff --git a/DocService/sources/DocsCoServer.js b/DocService/sources/DocsCoServer.js
index 0365510..ee25b0c 100644
index bd209ea..9151489 100644
--- a/DocService/sources/DocsCoServer.js
+++ b/DocService/sources/DocsCoServer.js
@@ -163,7 +163,7 @@ let connections = []; // Активные соединения
@@ -103,6 +103,7 @@ const pubsubService = require('./pubsubRabbitMQ');
const queueService = require('./../../Common/sources/taskqueueRabbitMQ');
const rabbitMQCore = require('./../../Common/sources/rabbitMQCore');
const activeMQCore = require('./../../Common/sources/activeMQCore');
+const license = require('./../../Common/sources/license');
const editorDataStorage = require('./' + configCommon.get('services.CoAuthoring.server.editorDataStorage'));
let cfgEditor = JSON.parse(JSON.stringify(config.get('editor')));
@@ -162,7 +163,7 @@ let connections = []; // Активные соединения
let lockDocumentsTimerId = {};//to drop connection that can't unlockDocument
let pubsub;
let queue;
-let licenseInfo = {type: constants.LICENSE_RESULT.Error, light: false, branding: false, customization: false, plugins: false};
+let licenseInfo = license.readLicense().next().value;
let shutdownFlag = false;
let expDocumentsStep = gc.getCronStep(cfgExpDocumentsCron);
@@ -3094,7 +3094,7 @@ exports.install = function(server, callbackFunction) {
const MIN_SAVE_EXPIRATION = 60000;
@@ -2976,7 +2977,7 @@ exports.install = function(server, callbackFunction) {
});
};
exports.setLicenseInfo = function(data) {
@@ -140,5 +147,5 @@ index 40bf93e..1df9c10 100644
build-date: $(GRUNT_FILES)
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
--
2.31.1
2.30.2

File diff suppressed because it is too large Load Diff