[GH-ISSUE #31] Synology package for papermerge #23

Closed
opened 2026-02-25 21:31:01 +03:00 by kerem · 18 comments
Owner

Originally created by @mtonnie on GitHub (Jul 9, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/31

What about the idea to create a package for Synology NAS devices, maybe based and distributed on SynoCommunity spksrc?

We could create a simple installation wizard to make the configuration simple and comfortable.

Was well I would prefer to create a native package (not based on docker), because this can be used on smaller devices without docker as well.

I would really appreciate to use Synology single sign on, is there an authentication middleware available for Django?

Originally created by @mtonnie on GitHub (Jul 9, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/31 What about the idea to create a package for Synology NAS devices, maybe based and distributed on SynoCommunity [spksrc]([url](https://github.com/SynoCommunity/spksrc))? We could create a simple installation wizard to make the configuration simple and comfortable. Was well I would prefer to create a native package (not based on docker), because this can be used on smaller devices without docker as well. I would really appreciate to use Synology single sign on, is there an authentication middleware available for Django?
kerem 2026-02-25 21:31:01 +03:00
  • closed this issue
  • added the
    packaging
    label
Author
Owner

@ciur commented on GitHub (Jul 9, 2020):

This is definitely a very good idea and something which I will do. I own a Synology NAS (ds216j) as well, so it would be easy for me to test the package.

However, I will postpone this task for September maybe even October (2020) as I want to deliver 1.4.0 release first. Beside this release, I want to deploy online (live) demo.

I would really appreciate to use Synology single sign on, is there an authentication middleware available for Django?

There are various authentication middleware possibilities. I am not sure what SSO synology uses. At this moment I cannot answer your question. I need to investigate more on this topic.

Thank you for suggestions and for opening the ticket!

<!-- gh-comment-id:655961949 --> @ciur commented on GitHub (Jul 9, 2020): This is definitely a very good idea and something which I will do. I own a Synology NAS (ds216j) as well, so it would be easy for me to test the package. However, I will postpone this task for September maybe even October (2020) as I want to deliver 1.4.0 release first. Beside this release, I want to deploy online (live) demo. > I would really appreciate to use Synology single sign on, is there an authentication middleware available for Django? There are various authentication middleware possibilities. I am not sure what SSO synology uses. At this moment I cannot answer your question. I need to investigate more on this topic. Thank you for suggestions and for opening the ticket!
Author
Owner

@mtonnie commented on GitHub (Jul 9, 2020):

Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity?
Do you agree to push the package sources to spksrc repository?

Maybe i'll try to start to package it, so it's good to know which Synology model you have.
And probably which other models the users own.

<!-- gh-comment-id:655966289 --> @mtonnie commented on GitHub (Jul 9, 2020): Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity? Do you agree to push the package sources to spksrc repository? Maybe i'll try to start to package it, so it's good to know which Synology model you have. And probably which other models the users own.
Author
Owner

@ciur commented on GitHub (Jul 9, 2020):

Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity?

To be honest, I never heard of neither of SynoCommunity nor spksrc up until today.

are you fine with spksrc from SynoCommunity

Can you please me more specific? what do you mean with that ?

any preferences concerning the packages sdk

What are the options ? Again, as I mentioned above - never heard of - until today.

Do you agree to push the package sources to spksrc repository?

If you mean Papermerge sources - yes, why not ?

My Synology model is DS2016j.

<!-- gh-comment-id:656027481 --> @ciur commented on GitHub (Jul 9, 2020): > Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity? To be honest, I never heard of neither of SynoCommunity nor spksrc up until today. > are you fine with spksrc from SynoCommunity Can you please me more specific? what do you mean with that ? > any preferences concerning the packages sdk What are the options ? Again, as I mentioned above - never heard of - until today. > Do you agree to push the package sources to spksrc repository? If you mean Papermerge sources - yes, why not ? My Synology model is DS2016j.
Author
Owner

@mtonnie commented on GitHub (Jul 9, 2020):

Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity?

To be honest, I never heard of neither of SynoCommunity nor spksrc up until today.

are you fine with spksrc from SynoCommunity

Can you please me more specific? what do you mean with that ?

any preferences concerning the packages sdk

What are the options ? Again, as I mentioned above - never heard of - until today.

Do you agree to push the package sources to spksrc repository?

If you mean Papermerge sources - yes, why not ?

My Synology model is DS2016j.

Ok, if you like to make a custom package for Synology you are propably starting reading the Synology's developers guide.
The examples from Sylology will use some scripts for packaging (pkgscripts-ng), this is the toolkit which Synology provides to create 3rd party packages.

As an alternative to the toolkit from Synology you can use the one from SynoCommunity (spksrc). There are already some neccesray dependencies available e.g. python, tessteract, ... you can reuse.

In case of using spksrc's repository, I guess it makes sense to push the things which are related to packaging to the repository of spksrc. So things maybe reuse from someone else for other packages, this might affect dependencies which are neccesary for papermerge.

The whole sourcecode for papermerge will still be manged can still be managed here ord in the papermerge organization (haven't understood why it's seperated at the moment).

In the end you need a repository, where you will provide the packages for Synology diskstation to dowbnload from. I would also recommend to participate from the existing repositiory from SynoCommunity.

Hopefully that helps.

<!-- gh-comment-id:656034357 --> @mtonnie commented on GitHub (Jul 9, 2020): > > > > Do you have any preferences concerning the packages sdk, or are you fine with spksrc from SynoCommunity? > > To be honest, I never heard of neither of SynoCommunity nor spksrc up until today. > > > are you fine with spksrc from SynoCommunity > > Can you please me more specific? what do you mean with that ? > > > any preferences concerning the packages sdk > > What are the options ? Again, as I mentioned above - never heard of - until today. > > > Do you agree to push the package sources to spksrc repository? > > If you mean Papermerge sources - yes, why not ? > > My Synology model is DS2016j. Ok, if you like to make a custom package for Synology you are propably starting reading the Synology's developers guide. The examples from Sylology will use some scripts for packaging ([pkgscripts-ng](https://github.com/SynologyOpenSource/pkgscripts-ng)), this is the toolkit which Synology provides to create 3rd party packages. As an alternative to the toolkit from Synology you can use the one from SynoCommunity ([spksrc](https://github.com/SynoCommunity/spksrc)). There are already some neccesray dependencies available e.g. python, tessteract, ... you can reuse. In case of using spksrc's repository, I guess it makes sense to push the things which are related to packaging to the repository of spksrc. So things maybe reuse from someone else for other packages, this might affect dependencies which are neccesary for papermerge. The whole sourcecode for papermerge will still be manged can still be managed here ord in the papermerge organization (haven't understood why it's seperated at the moment). In the end you need a repository, where you will provide the packages for Synology diskstation to dowbnload from. I would also recommend to participate from the existing [repositiory ](https://synocommunity.com/packages) from SynoCommunity. Hopefully that helps.
Author
Owner

@ciur commented on GitHub (Jul 9, 2020):

Thank you for well organized info/guidance. As I mentioned in first comment, I will postpone this ticket until September/October 2020.

<!-- gh-comment-id:656225225 --> @ciur commented on GitHub (Jul 9, 2020): Thank you for well organized info/guidance. As I mentioned in first comment, I will postpone this ticket until September/October 2020.
Author
Owner

@mtonnie commented on GitHub (Jul 16, 2020):

Ok, in other words. I'm planning to contribute to this project, I like to focus on packaging this application for Synology NAS.
But I don't like to decide everything by myself without an discussion, that's why I made this issue.

I would propose to start with an simple package

  • Very limited / basic installation wizard
  • SQLite database
  • One shared folder (papermerge) for all files

It's possible to improve this later ...

To start the packaging process it would be really good to have separated requirements for development and run.
I guess it should be easy for you to share which dependencies are not needed for production, e.g. sphinx.
These packages are not needed for the Synology package, this will reduce the effort for packaging especially if the affected package has binary dependencies or needs to be cross compiled.

<!-- gh-comment-id:659194057 --> @mtonnie commented on GitHub (Jul 16, 2020): Ok, in other words. I'm planning to contribute to this project, I like to focus on packaging this application for Synology NAS. But I don't like to decide everything by myself without an discussion, that's why I made this issue. I would propose to start with an simple package - Very limited / basic installation wizard - SQLite database - One shared folder (papermerge) for all files It's possible to improve this later ... To start the packaging process it would be really good to have separated requirements for development and run. I guess it should be easy for you to share which dependencies are not needed for production, e.g. sphinx. These packages are not needed for the Synology package, this will reduce the effort for packaging especially if the affected package has binary dependencies or needs to be cross compiled.
Author
Owner

@mtonnie commented on GitHub (Jul 21, 2020):

Is it really necessary to use Python version 3.8, or can we use 3.7 as well?
Why I'm asking, currently only version 3.7 is wip from SynoCommunity.
If version 3.8 is required we have to update python too, this will increase the effort a lot.

<!-- gh-comment-id:661922390 --> @mtonnie commented on GitHub (Jul 21, 2020): Is it really necessary to use Python version 3.8, or can we use 3.7 as well? Why I'm asking, currently only version 3.7 is wip from SynoCommunity. If version 3.8 is required we have to update python too, this will increase the effort a lot.
Author
Owner

@ciur commented on GitHub (Jul 25, 2020):

@mtonnie, I am really sorry for late answer, I cannot figure out how to receive email notifications for specific project only... so I am manually looking each ticket - which makes it easy to miss.
I will highly appreciate your help and i would gladly collaborate on packaging Papermerge for Synology NAS.
To avoid any confusing or late answers in future, send me an email. You will find my email at the very bottom of README page, on github.
Answers to your questions will follow in next comment.

<!-- gh-comment-id:663841104 --> @ciur commented on GitHub (Jul 25, 2020): @mtonnie, I am really sorry for late answer, I cannot figure out how to receive email notifications for specific project only... so I am manually looking each ticket - which makes it easy to miss. I will highly appreciate your help and i would gladly collaborate on packaging Papermerge for Synology NAS. To avoid any confusing or late answers in future, send me an email. You will find my email at the [very bottom of README page, on github.](https://github.com/ciur/papermerge) Answers to your questions will follow in next comment.
Author
Owner

@ciur commented on GitHub (Jul 25, 2020):

To start the packaging process it would be really good to have separated requirements for development and run.
I guess it should be easy for you to share which dependencies are not needed for production, e.g. sphinx.

This is simple one. I will split requirements file in several files. It is a good practice anyway.

Is it really necessary to use Python version 3.8, or can we use 3.7 as well?
Why I'm asking, currently only version 3.7 is wip from SynoCommunity.
If version 3.8 is required we have to update python too, this will increase the effort a lot.

Tricky question. I need some time to provide an accurate answer.
I remember I had a valid reason to move from 3.7 to 3.8. The problem is that:

  1. at the moment I don't remember that reason :)
  2. I am not sure if past reason still applies (there was lots of refactoring in between)

In any case I know for sure there were issues with subprocess module which had its arguments changed in 3.6 and then 3.7. For example in 3.7:Added the text parameter, as a more understandable alias of universal_newlines. Added the capture_output parameter. Subprocess is used a lot in Papermerge (starting all sort of utils like pdfinfo, convert, tesseract).
Give me some time to tackle this issue and I will come back with an accurate answer.

<!-- gh-comment-id:663842430 --> @ciur commented on GitHub (Jul 25, 2020): > To start the packaging process it would be really good to have separated requirements for development and run. > I guess it should be easy for you to share which dependencies are not needed for production, e.g. sphinx. This is simple one. I will split requirements file in several files. It is a good practice anyway. > > Is it really necessary to use Python version 3.8, or can we use 3.7 as well? > Why I'm asking, currently only version 3.7 is wip from SynoCommunity. > If version 3.8 is required we have to update python too, this will increase the effort a lot. Tricky question. I need some time to provide an accurate answer. I remember I had a valid reason to move from 3.7 to 3.8. The problem is that: 1. at the moment I don't remember that reason :) 2. I am not sure if past reason still applies (there was lots of refactoring in between) In any case I know for sure there were issues with subprocess module which had its arguments changed in 3.6 and then 3.7. For example in _3.7:Added the text parameter, as a more understandable alias of universal_newlines. Added the capture_output parameter._ Subprocess is used a lot in Papermerge (starting all sort of utils like pdfinfo, convert, tesseract). Give me some time to tackle this issue and I will come back with an accurate answer.
Author
Owner

@ciur commented on GitHub (Jul 26, 2020):

I had a deeper look into the issue. Papermerge runs as expected with python 3.7. All UT pass. None of the features is affected by lowering requirements from 3.8 to 3.7.
Thus, I lowered requirements to python 3.7.
Also, I removed all unused dependencies. The minimal python dependencies (requirements) modules are in now requirements/base.txt.

I am speaking in context of master branch, which reflects the latest changes.

<!-- gh-comment-id:663948209 --> @ciur commented on GitHub (Jul 26, 2020): I had a deeper look into the issue. Papermerge runs as expected with python 3.7. All UT pass. None of the features is affected by lowering requirements from 3.8 to 3.7. Thus, I lowered requirements to python 3.7. Also, I removed all unused dependencies. The minimal python dependencies (requirements) modules are in now requirements/base.txt. I am speaking in context of master branch, which reflects the latest changes.
Author
Owner

@mtonnie commented on GitHub (Aug 14, 2020):

I have opened this issues more than a month ago, but this doesn't mean I haven't made some progress.
Now it's time to share it!

I have finished the basic packaging of Papermerge, there are still a lot of topics to be taken into account.
But it's soon time to share the beta packages with everyone who is interested an get some feedback!

I'll try to finish the installation wizard and process until end of next week.
With this step I'll share the packages and provide a tutorial how to build the necessary packages for other Synology model (architectures) by yourself.

Screenshots installation wizard:
2020-08-14 21_23_24-DS216play - Synology DiskStation
2020-08-14 21_24_00-DS216play - Synology DiskStation
2020-08-14 21_27_25-DS216play - Synology DiskStation
2020-08-14 21_28_19-DS216play - Synology DiskStation
2020-08-14 21_28_40-DS216play - Synology DiskStation
2020-08-14 21_28_54-DS216play - Synology DiskStation
2020-08-14 21_29_38-DS216play - Synology DiskStation
2020-08-14 21_42_54-DS216play - Synology DiskStation

I'm glad to here what you are thinking about it, feel free to provide some feedback.
Or share your ideas concerning Synology packaging for Papermerge.

<!-- gh-comment-id:674248229 --> @mtonnie commented on GitHub (Aug 14, 2020): I have opened this issues more than a month ago, but this doesn't mean I haven't made some progress. Now it's time to share it! I have finished the basic packaging of Papermerge, there are still a lot of topics to be taken into account. But it's soon time to share the beta packages with everyone who is interested an get some feedback! I'll try to finish the installation wizard and process until end of next week. With this step I'll share the packages and provide a tutorial how to build the necessary packages for other Synology model (architectures) by yourself. Screenshots installation wizard: <img width="525" alt="2020-08-14 21_23_24-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287808-e2c19280-de78-11ea-959e-8311ff202ae2.png"> <img width="525" alt="2020-08-14 21_24_00-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287810-e523ec80-de78-11ea-9071-83f666de4a49.png"> <img width="526" alt="2020-08-14 21_27_25-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287821-ebb26400-de78-11ea-937b-c6bf4bc27ef4.png"> <img width="526" alt="2020-08-14 21_28_19-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287828-ef45eb00-de78-11ea-9080-b8b8810b3c0d.png"> <img width="526" alt="2020-08-14 21_28_40-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287832-f10fae80-de78-11ea-9a90-033aa50888ec.png"> <img width="526" alt="2020-08-14 21_28_54-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287835-f3720880-de78-11ea-9c88-21889da0008f.png"> <img width="526" alt="2020-08-14 21_29_38-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287839-f5d46280-de78-11ea-9b30-20c76ef39d48.png"> <img width="526" alt="2020-08-14 21_42_54-DS216play - Synology DiskStation" src="https://user-images.githubusercontent.com/7443153/90287848-f967e980-de78-11ea-9686-d40613dc4ef6.png"> I'm glad to here what you are thinking about it, feel free to provide some feedback. Or share your ideas concerning Synology packaging for Papermerge.
Author
Owner

@mtonnie commented on GitHub (Aug 14, 2020):

@ciur
Please let me know which informations you like to see for the highlighted fields.

grafik

<!-- gh-comment-id:674251074 --> @mtonnie commented on GitHub (Aug 14, 2020): @ciur Please let me know which informations you like to see for the highlighted fields. ![grafik](https://user-images.githubusercontent.com/7443153/90288429-28328f80-de7a-11ea-9104-d9d561e3aa5f.png)
Author
Owner

@ciur commented on GitHub (Aug 15, 2020):

Hi @mtonnie

Brilliant work!
Thank you so much for your contribution!

Regarding your question:
For Entwickler- https://papermerge.com
For Beschreibung - Open Source Document Management System for Electronic Archives

To be honest, I am Selbstandig - I don't have my own company yet (I mean, gmbh)- to be mentioned as Entwickler. Also I would prefer to mention website instead of my Vorname + Nachname.

In case Entwickler field does not allow URL - just put there Papermerge DMS.

Danke noch mal!

<!-- gh-comment-id:674355074 --> @ciur commented on GitHub (Aug 15, 2020): Hi @mtonnie Brilliant work! Thank you so much for your contribution! Regarding your question: For Entwickler- https://papermerge.com For Beschreibung - Open Source Document Management System for Electronic Archives To be honest, I am Selbstandig - I don't have my own company yet (I mean, gmbh)- to be mentioned as Entwickler. Also I would prefer to mention website instead of my Vorname + Nachname. In case Entwickler field does not allow URL - just put there Papermerge DMS. Danke noch mal!
Author
Owner

@mtonnie commented on GitHub (Aug 18, 2020):

Guess it's time to deliver ...
I like to share the current state of Synology package with everyone who is interested!
Please keep in mind, it's a very early version of the package which isn't fully functional an a few features are still missing.

That means, use it on your own risk, currently it's not recommended to use it in production environment.
This doesn't mean it won't work, but in some cases you would have to know deeper knowledge about Synology OS (Linux), Python and Papermerge to get issues solved.

And please keep in mind, the package update process hasn't been implemented jet.
You have to uninstall and install again or hope that updates will work.

But anyway you are very welcome to give it a try and come back with your questions, issues and ideas.

You will find the current sources at my GitHub repository.
Three packages (Python 3.7.7, Tesseract OCR 4.01 and Papermerge) are needed, if you can't compile them yourself - let me know it I'll help you.

Give it a try it's quite simple just use Gitpod to get a fully configured build / development environment.

  • Just go to the desired package e.g. papermerge
    cd spk/papermerge

  • Build the arch you need e.g. generic x64
    env ARCH=x64 TCVERSION=6.1 make

  • Download the packages from ../../packages

Have fun - you are ready to install the packages

<!-- gh-comment-id:675592596 --> @mtonnie commented on GitHub (Aug 18, 2020): Guess it's time to deliver ... I like to share the current state of Synology package with everyone who is interested! Please keep in mind, it's a very early version of the package which isn't fully functional an a few features are still missing. That means, use it on your own risk, currently it's not recommended to use it in production environment. This doesn't mean it won't work, but in some cases you would have to know deeper knowledge about Synology OS (Linux), Python and Papermerge to get issues solved. And please keep in mind, the package update process hasn't been implemented jet. You have to uninstall and install again or hope that updates will work. But anyway you are very welcome to give it a try and come back with your questions, issues and ideas. You will find the current sources at my [GitHub repository](https://github.com/mtonnie/spksrc/tree/spk-papermerge). Three packages (Python 3.7.7, Tesseract OCR 4.01 and Papermerge) are needed, if you can't compile them yourself - let me know it I'll help you. Give it a try it's quite simple just use [Gitpod](https://gitpod.io/#https://github.com/mtonnie/spksrc/tree/spk-papermerge) to get a fully configured build / development environment. - Just go to the desired package e.g. papermerge `cd spk/papermerge` - Build the arch you need e.g. generic x64 `env ARCH=x64 TCVERSION=6.1 make` - Download the packages from ../../packages Have fun - you are ready to install the packages
Author
Owner

@ciur commented on GitHub (Aug 19, 2020):

looks awesome! Give me couple of days to play with this, and I will come back with feedback.

<!-- gh-comment-id:675876626 --> @ciur commented on GitHub (Aug 19, 2020): looks awesome! Give me couple of days to play with this, and I will come back with feedback.
Author
Owner

@rb-26 commented on GitHub (Sep 3, 2020):

Installed all packages as mentioned above and I get "Not found" when I browse to port 8000 on the NAS IP.

Am I missing something?

<!-- gh-comment-id:686220032 --> @rb-26 commented on GitHub (Sep 3, 2020): Installed all packages as mentioned above and I get "Not found" when I browse to port 8000 on the NAS IP. Am I missing something?
Author
Owner

@mtonnie commented on GitHub (Sep 3, 2020):

Maybe, the port ist 8880 instead of 8000.
The reason ist, port 8000 is already use by Icecast

But thank's for the reminder, papermerge doesn't provide a link yet. I'll fix this in one of the next updates.

<!-- gh-comment-id:686244124 --> @mtonnie commented on GitHub (Sep 3, 2020): Maybe, the port ist 8880 instead of 8000. The reason ist, port 8000 is already use by [Icecast](https://github.com/synocommunity/spksrc/wiki/SynoCommunity-Used-Ports#applications-on-other-ports) But thank's for the reminder, papermerge doesn't provide a link yet. I'll fix this in one of the next updates.
Author
Owner

@rb-26 commented on GitHub (Sep 3, 2020):

That worked. Thanks for the help. I will let you know if I have any issues with it.

<!-- gh-comment-id:686255291 --> @rb-26 commented on GitHub (Sep 3, 2020): That worked. Thanks for the help. I will let you know if I have any issues with it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#23
No description provided.