Giter Club home page Giter Club logo

document-server-package's People

Contributors

agolybev avatar aleksandrfedorov97 avatar cyger avatar danilapog avatar eugenekozyrev avatar evgeniy-antonyuk avatar heatray avatar hellonadya avatar ivanzuevskyi avatar k0r0l avatar kireevdmitry avatar linneys avatar nasrullonurullaev avatar papacarlo avatar romandemidov avatar sergemalkin avatar shockwavenn avatar svetlana81 avatar trofim24 avatar truejegor avatar vyacheslavsemin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

document-server-package's Issues

Updating on Debian via apt overwrites default.json AND local.json

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.

Fail build rpm on Centos 7

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/

deb package configure fails with custom ds-port

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.

Debian build: Architecture is not recognised in Debian 11

Describe your problem:

When building Debian package it fails because of not detecting proper architecture.

Steps to reproduce the problem:

  • Build documentserver thanks to build_tools in /root/build_tools directory.

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.

{{package_sysname}} breaks Debian package builds

Quick description

New {{package_sysname}} string breaks Debian package builds.

Associated commit

Here there is the commit where it is introduced: b41c3d0 .

More explanation

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

.

Fix

My current fix/workaround just replaces {{package_sysname}} to onlyoffice and then the package is built without any problem.

System

I am trying to build tag: v7.4.1.36.

Pull request

If you confirm the string replacement is the way to go I am willing to open a pull request for fixing this.

Debian package build is non-straight forward

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 Makefiletarget 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)

.

  1. Feedback is appreciated.

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!

My current usage

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

how do you run systemd inside docker container

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.

Debian build: dpkg-genbuildinfo fails because of not having correct package directory

Describe your problem:

When building Debian package it fails because of dpkg-genbuildinfo not having the correct package directory.

Steps to reproduce the problem:

  • Build documentserver thanks to build_tools in /root/build_tools directory.

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.

Debian package: RFE: Do not overwrite local.json by default

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.