onlyoffice / document-server-package Goto Github PK
View Code? Open in Web Editor NEWPackages for Document Server
License: GNU Affero General Public License v3.0
Packages for Document Server
License: GNU Affero General Public License v3.0
Do you want to request a feature or report a bug?
A bug on Linux.
What is the current behavior?
Updating on Debian via apt overwrites /etc/onlyoffice/documentserver/local.json.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Just install, change the local.json and update.
What is the expected behavior?
default.json should be updated, but local.json should stay the same
Did this work in previous versions of DocumentServer?
Not sure.
DocumentServer version:
onlyoffice-documentserver v5.5.3-39
Operating System:
Debian GNU/Linux 10 (buster)
Browser version:
(not relevant)
Thank you for the good work.
Build rpm on Centos 7 is failed.
Different version of utility rename. In Centos 7 need use prename.
Using prename in Ubuntu 14.04 works fain.
diff --git a/rpm/common.spec b/rpm/common.spec
index d46632e..78ef9ef 100644
--- a/rpm/common.spec
+++ b/rpm/common.spec
@@ -74,7 +74,7 @@ mkdir -p "$DS_SUPERVISOR_CONF"
cp %{_builddir}/../../../common/documentserver/supervisor/*.conf "$DS_SUPERVISOR_CONF"
# rename extention for supervisor config files
-rename 's/.conf$/.ini/' "$DS_SUPERVISOR_CONF"*
+prename 's/.conf$/.ini/' "$DS_SUPERVISOR_CONF"*
#install nginx config
DS_NGINX_CONF=$CONF_DIR/nginx/
It was successfully compiled in ubuntu using build tools
get clone https://github.com/ONLYOFFICE/document-server-package
cd doument-server-package
make exe
Execution failed, please ask which environments need to be installed on ubunt again
When a custom ds-port is setted package configure always fails for nginx restart failed for wrong configuration.
As saw the postinst change the port in the all virtual hosts causing issue after duplicate on the same port, in particular the internal service one that should remain to port 80.
I setted correctly as wrote in documentation, for example:
echo onlyoffice-documentserver-ee onlyoffice/ds-port select 4444 | sudo debconf-set-selections
From a fast look the issue is cause by the sed on all listen in the https://github.com/ONLYOFFICE/document-server-package/blob/master/deb/template/postinst.m4
As workaround for now after configure failing I comment service restart in postinst:
vi /var/lib/dpkg/info/onlyoffice-documentserver-ee.postinst
#service supervisor restart >/dev/null 2>&1
#service nginx restart >/dev/null 2>&1
I'll redo the configure that complete, after I'll fix the listen lines in ds.conf changing only the virtualhost for https and restarting the services.
postinst ds-port part should be fixed/improved and a possible improvements would be 2 additional different parameters (for example ds-port-http and ds-port-https) for change only http virtualhost and https virtualhost (for example I need only the https one) and the internal service one should remain always the same port FWIK
Thanks for any reply and sorry for my bad english.
Describe your problem:
When building Debian package it fails because of not detecting proper architecture.
Steps to reproduce the problem:
Try to package thanks to:
apt install build-essential m4 npm
npm install -g pkg
cd /root
git clone https://github.com/ONLYOFFICE/document-server-package.git
cd document-server-package/deb
apt build-dep ./
cd /root/document-server-package
PRODUCT_VERSION='7.0.0' BUILD_NUMBER='132' make deb
What were you expecting to happen
The package is built and no error happens.
What happens instead
Sorry, I don't have the full output.
Basically it was trying to read ../build_tools/out/linux_/onlyoffice/documentserver/
while it had to read ../build_tools/out/linux_64/onlyoffice/documentserver/
instead.
Not finding those files halted the Makefile process.
Proposed fix
Not sure.
The problem relies on the uname -p
command. I guess it usually outputs amd64 or i386.
In Debian 11 it outputs unknown
.
Maybe add an alternative way of knowing the current platform if uname -p
command outputs unknown
. Probably using: uname -m
which outputs: x86_64
for me.
Workaround
This is a quick-and-dirty workaround so that you can finally build the package in my machine:
sed -i 's/TARGET := $(PLATFORM)_$(ARCHITECTURE)/TARGET := $(PLATFORM)_64/g' Makefile
.
document-server-package base repo version: v7.0.0.132
Operating system: Debian 11 Netinst
Compiler version: N/A.
New {{package_sysname}}
string breaks Debian package builds.
Here there is the commit where it is introduced: b41c3d0 .
It seems to me that {{package_sysname}}
is a syntax from rpm packages that use a environment variable or spec variable for setting this.
This does not seem to work on my Debian 11.
When trying to run: make deb
I am getting this error:
make[2]: se entra en el directorio '/root/document-server-package/deb/build'
chmod o-rwx debian/{{package_sysname}}-documentserver/etc/{{package_sysname}}/documentserver/*.json
chmod: no se puede acceder a 'debian/{{package_sysname}}-documentserver/etc/{{package_sysname}}/documentserver/*.json': No existe el fichero o el directorio
make[2]: *** [debian/rules:15: execute_after_dh_fixperms] Error 1
make[2]: se sale del directorio '/root/document-server-package/deb/build'
make[1]: *** [debian/rules:7: binary] Error 2
make[1]: se sale del directorio '/root/document-server-package/deb/build'
dpkg-buildpackage: fallo: debian/rules binary subprocess returned exit status 2
.
My current fix/workaround just replaces {{package_sysname}}
to onlyoffice
and then the package is built without any problem.
I am trying to build tag: v7.4.1.36
.
If you confirm the string replacement is the way to go I am willing to open a pull request for fixing this.
1 ) In order to build a Debian package you need to install first its dependencies.
I understand that I cannot install an specific 'npm pkg' package from Debian repos because it's nowhere to be found.
2 ) However I find concerning not having an standard way of installing Debian source packages which are needed.
3 ) In a regular Debian package you can use apt build-dep packagename
for doing so.
If you are working on your own package you can use apt build-dep path/to/package/source/directory
although I don't seem to find that usage documented anywhere.
In order for apt build-dep
to work on your package source directory the package needs to have the Debian package files (debian/
directory) that describe which are the actual source Debian packages.
That's not the case if you clone this repo.
4 ) You need to ensure that the debian dependencies files are built.
However there is not an Makefile
target that eases that task.
This is where I manually add to Makefile
file a custom target so that I can more-or-less automate this task:
deb_dependencies: $(DEB_DEPS)
.
As the project does not have a proper README on how this repo is used for building a Debian package there might be an alternative way of achieving what I'm looking for.
Else I don't mind to submit a pull request with that deb_dependencies
addition to the Makefile
.
Thank you!
apt install build-essential m4 npm
npm install -g pkg
cd /root
git clone https://github.com/ONLYOFFICE/document-server-package.git
# Workaround for installing dependencies - BEGIN
cd /root/document-server-package
cat << EOF >> Makefile
deb_dependencies: \$(DEB_DEPS)
EOF
make deb_dependencies
cd /root/document-server-package/deb/build
apt build-dep ./
# Workaround for installing dependencies - END
cd /root/document-server-package
make deb
The commit 01ea347 has removed common/documentserver/supervisor
and added common/documentserver/systemd
.
But you can't run systemd inside docker. So this will not be suitable for installing onlyoffice inside docker container.
Describe your problem:
When building Debian package it fails because of dpkg-genbuildinfo not having the correct package directory.
Steps to reproduce the problem:
Try to package thanks to:
apt install build-essential m4 npm
npm install -g pkg
cd /root
git clone https://github.com/ONLYOFFICE/document-server-package.git
cd document-server-package/deb
apt build-dep ./
cd /root/document-server-package
PRODUCT_VERSION='7.0.0' BUILD_NUMBER='132' make deb
What were you expecting to happen
The package is built and no error happens.
What happens instead
The main package is built but the main build process (Makefile) fails because of genbuildinfo not working properly.
dpkg-deb: construyendo el paquete `onlyoffice-documentserver-dbgsym' en `./onlyoffice-documentserver-dbgsym_7.0.0-132
_amd64.deb'.
dpkg-deb: construyendo el paquete `onlyoffice-documentserver' en `./onlyoffice-documentserver_7.0.0-132_amd64.deb'.
make[2]: se sale del directorio '/root/document-server-package/deb'
make[1]: se sale del directorio '/root/document-server-package/deb'
dpkg-genbuildinfo --build=binary
dpkg-genbuildinfo: fallo: no se puede obtener el estado (fstat) del fichero «../onlyoffice-documentserver-dbgsym_7.0.0-132_amd64.deb»: No such file or directory
dpkg-buildpackage: fallo: dpkg-genbuildinfo --build=binary subprocess returned exit status 255
make: *** [Makefile:445: deb/onlyoffice-documentserver_7.0.0-132_amd64.deb] Error 255
Proposed fix
At:
https://github.com/ONLYOFFICE/document-server-package/blob/v7.0.0.132/Makefile#L445
you can fix the current line:
cd deb && dpkg-buildpackage -b -uc -us --changes-option=-u.
so that it is:
cd deb && dpkg-buildpackage -b -uc -us --changes-option=-u. --buildinfo-option=-u.
.
document-server-package base repo version: v7.0.0.132
Operating system: Debian 11 Netinst
Compiler version: N/A.
I'm open to send you a pull request that fixes this problem if you confirm me that the oldest machine where you build Debian packages has --buildinfo-option
as a dpkg-buildpackage option.
Describe your problem
When you upgrade onlyoffice-documentserver package it overwrites /etc/onlyoffice/documentserver/local.json
file every time with its default contents.
About JWT_SECRET
Please note that I am already aware about the official way of dealing with local.json being overwritten when you upgrade the onlyoffice-documentserver package that it's explained at the Installing ONLYOFFICE Docs Community Edition for Debian, Ubuntu, and derivatives page. Those are the JWT options.
Request
At our installations we modify more stuff in that file than the JWT_SECRET.
What I request is what happens in most usual Debian packages. You define the local.json file as a conf file that your final user can modify in your package definition.
So when the package is updated if the user has modified that file a message similar to following one is asked to the final user.
Configuration file '/etc/onlyoffice/documentserver/local.json'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** local.json (Y/I/N/O/D/Z) [default=N] ? N
Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.