SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
2.99k stars 1.22k forks source link

Need to Point Installed Sickbeard Custom to Python 3 on Synology NAS for Pymedusa (Now Python 3 Compatible) #3710

Open wreid23 opened 5 years ago

wreid23 commented 5 years ago

For new Package Requests, see the guidelines

Setup

Package Name: sickbeard-custom Package Version:

NAS Model: DS3615xs NAS Architecture: XPENOLOGY INTEL DSM version: DSM 6.1.7-15284 Update 3

Expected behavior

Tell us what should happen:

I Need Package to start and use Python 3 package that is currently installed on NAS. Pymedusa now supports python3: https://github.com/pymedusa/Medusa/wiki/Switch-to-Python-3 Need to point pymedusa to python3 module in: /volume1/@appstore/python3/bin and confirm that it will start and look for python3 going forward instead of 2.7 not sure how to do that .

Actual behavior

Tell us what happens instead: medusa Python 2.7 is used as it is currently the default

Steps to reproduce

1. Start Pymedusa branch from Sickbeard-Custom 2. When in Pymedusa it will show running 2.7 3. Not sure what to change to use installed python3 packages

Package log

Check Package Center or /usr/local/{package}/var/

Insert the package log here

Other logs

E.g. /var/log/messages or /var/log/synopkg.log

Insert log here
ymartin59 commented 5 years ago

Problem is that "sickbeard-custom" is a single package to run multiple sickbeard-forks and switching to Python 3 will break any other fork...

BenjV commented 5 years ago

It should be a relative simple change to the package to make this possible. Just add a question to the package if python 2 or python 3 must be used and if statement in the start-stop-status commandfile. And remove the dependancy to python 2 in the INFO file.

Jamyz commented 4 years ago

It should be a relative simple change to the package to make this possible. Just add a question to the package if python 2 or python 3 must be used and if statement in the start-stop-status commandfile. And remove the dependancy to python 2 in the INFO file.

@BenjV This package is available ?

Jamyz commented 4 years ago

@BenjV i create the package and you can download here Thanks @alexey-pimenov

BenjV commented 4 years ago

Thanks but it should be added to the SynoCommunity

alexey-pimenov commented 4 years ago

@BenjV there is a PR #3756 for it. Since there are a lot of forks for sickbeard and not all of them support python3 I made separate package for medusa.

BenjV commented 4 years ago

It would be better to change the current package and add a question if python 2 or python 3 should be used during installation. Then the user can choose themselves and when more forks start to support python 3 the package does not need to be updated. Otherwise we end up with two packages for every fork.

alexey-pimenov commented 4 years ago

@BenjV agree. So, I can change my package to sickbeard-custom-python3. Or if we want to reuse existing package we then won't able to use DSM dependency system and new package will have to do one of the following:

How do you see it?

BenjV commented 4 years ago

In my opinion, no dependency in the INFO file and via the service_preinst () in the "service -setup" script do the installation of the chosen python version automatically if it is not yet present.

And it should not be a new package like you suggested (sick-beard-custom-python3) but just a change of the current sick-beard-custom package.

scott451 commented 4 years ago

i have installed the custom package from jamyz. many thanks for that.

any news on modifications to standard package ?

akhlan commented 4 years ago

hello,

the package will be updated like the original application ?

marflao commented 3 years ago

Hope you don`t mind if I chime in here but I´m in the same boat as the thread starter.

I updated to the latest Python 3 version for my NAS (DS 213): image

But in the Medusa GUI it´s still pointing to the 2.7 version: image

Since I´m a noob when it comes to Putty, Linux and Co. I would appreciate your support how I can point Medusa to the proper Python 3 version.

Many thanks in advance.

BenjV commented 3 years ago

If you used the Sickbeard-beard custom this is not possible at the moment. That package will only function with Python 2 at the moment.

marflao commented 3 years ago

Thanks for your swift response, BenjV, much appreciated.

Is there another option I can use?

jaybeedk commented 3 years ago

@BenjV i create the package and you can download [here] https://mega.nz/#!XxYC3Ybb!cdKtWua9x51afjJDeUt1cHKzvy0FH3vlPIGTogk_nSI) Thanks @alexey-pimenov

Hope you don`t mind if I chime in here but I´m in the same boat as the thread starter.

I updated to the latest Python 3 version for my NAS (DS 213): But in the Medusa GUI it´s still pointing to the 2.7 version:

Since I´m a noob when it comes to Putty, Linux and Co. I would appreciate your support how I can point Medusa to the proper Python 3 version.

My "Python 2x" version ran sooo sluggish that I decided to do whatever it takes. I therefore took print-screens of all configuration pages, tabs and providers while making sure I had all necessary usernames, passwords and API keys in Notepad for later. I then uninstalled and re-installed from scratch using the package that @Jamyz linked to and it now runs on Python 3x. It was pretty easy to add the existing shows back

marflao commented 3 years ago

Hi zzappazz,

I did the "screenshots", too, last weeks and saw the package created by alexey-pimenov but hesitated to download/install since I wasn´t sure if it would work for my "older" Syno NAS.

jaybeedk commented 3 years ago

Hi @marflao

I have an older DS411+II, but I assume it works on any model since the package is called "medusa_noarch-all_20190826-2.spk". You could try performing a Manual Install in Package Center

BenjV commented 3 years ago

There is no performance or other gain by using Python 3 above Python 2. As long as Medusa is running on both there is no need to prefer one above the other.

That said the package of @alexey-pimenov is fine to use. I tested it.

jaybeedk commented 3 years ago

There is no performance or other gain by using Python 3 above Python 2. As long as Medusa is running on both there is no need to prefer one above the other.

That said the package of @alexey-pimenov is fine to use. I tested it.

Not sure what hardware you are using, but I'm using a slow Synology NAS. In my case performance had dropped considerably to the point of not being usable at all. I think this happened around the time the UX libraries were changed to perform more client-side calls.

Previously as soon as Daily Search started then responsiveness would drop noticably to the point of not being usable at all. Everything stopped. Pages were not rendered. Dialog boxes appeared stating that connections could not be made.

I have only recently upgraded however but I have not experienced such problems (yet). I believe I read somewhere that Python 3 can use multiple threads? That would correspond to what I am seeing as it seems more responsive. If not, then I guess I will run into the same performance issues, and then I will regrettably need to see elsewhere. For now, I will enjoy the potential placebo effect

BenjV commented 3 years ago

There is no performance difference. The difference between Python 3 and Python 2 is only syntax. And all Python versions support threading.

Maybe you should check if you run out if memory. When your Nas start swapping, it becomes very very slow.

marflao commented 3 years ago

Need to double check something in regards to the installation of the aforementioned package.

i) Do i need to stop/uninstall the current "SickBeard Custom" package? image

ii) Will it be required to give new permissions for that application? I´m referring to this article.

Thanks in advance.

p0psicles commented 3 years ago

In a few versions / weeks Medusa will drop support and updates on python 2. So that should be enough reason to switch to python3.

BenjV commented 3 years ago

I will create a package for Medusa running on Python 3 but need some time to make it.

marflao commented 3 years ago

Just for my understanding regarding the latest news shown in Medusa UI: in case "python 2" users don't use python 3 from October they will still be able to use Medusa (but won't get any further updates nor support), correct?

@BenjV how will your package differ from the one provided by @alexey-pimenov? I'm just trying to figure out if I stay with python 2 until you will be finished or give the other package a go (although I'm still not 100% sure how to move forward.. see my questions in my earlier post).

p0psicles commented 3 years ago

Just for my understanding regarding the latest news shown in Medusa UI: in case "python 2" users don't use python 3 from October they will still be able to use Medusa (but won't get any further updates nor support), correct?

That is correct.

marflao commented 3 years ago

Thanks for the confirmation, @p0psicles much appreciated.

BenjV commented 3 years ago

@marflao I am not sure what the difference is with the package of @alexey-pimenov But somebody else on another forum installed and it was running but not visible in the package center. I am not going to debug a package of someone else and I had already planned to create a Medusa package for Python 3.

So from my point of view I would say keep your Python 2 version for now until I finish the Python 3 version.

In any case an upgrade will not be possible, so it will be the following scenario.

marflao commented 3 years ago

But will it be "safe" to remove the python 2 package on the Syno (without the risk that it might be required for other packages)?

Asking the noob...

p0psicles commented 3 years ago

Python 2 will not be removed. Python 3 and 2 can operate on same system

BenjV commented 3 years ago

If it is still in use with other packages and you try to remove it, DSM will tell you that and ask if it must remove those packages or just quit removing Python 2. On the other hand no harm will be done to leave it installed. It does not do anything on its own, no cpu usage and only a very small amount of diskspace is used.

marflao commented 3 years ago

Thanks for the clarification, much appreciated.

zapru commented 3 years ago

If it is still in use with other packages and you try to remove it, DSM will tell you that and ask if it must remove those packages or just quit removing Python 2. On the other hand no harm will be done to leave it installed. It does not do anything on its own, no cpu usage and only a very small amount of diskspace is used.

zapru commented 3 years ago

Hi. Pls hlp. I have ds218play. I have Medusa installed. Everything worked great. Medusa offered an update, and it doesn't work after that. Installed applications are in the picture

Screenshot 2020-12-02 132959
zapru commented 3 years ago

Setup Package Name: sickbeard-custom Package Version: (Unfortunately I don't know exactly. Latest version before update from 12/1/2020)

NAS Model: DS218play NAS Architecture: Realtek RTD1296 SoC DSM version: DSM 6.2.3-25426 Update 2

p0psicles commented 3 years ago

Here you go. https://github.com/pymedusa/Medusa/wiki/Synology

BenjV commented 3 years ago

You cannot use Sickbeard-custom anymore for Medusa. Medusa stopped the support for Python 2 and sickbeard-custom uses Python 2 You need to install Python 3 from the SynoCommunity and after that my medusa package. You can find it here: https://github.com/BenjV/SYNO-packages When it is running you can restore from within Medusa the backup you made before you tried the upgrade.

zapru commented 3 years ago

You cannot use Sickbeard-custom anymore for Medusa. Medusa stopped the support for Python 2 and sickbeard-custom uses Python 2 You need to install Python 3 from the SynoCommunity and after that my medusa package. You can find it here: https://github.com/BenjV/SYNO-packages When it is running you can restore from within Medusa the backup you made before you tried the upgrade.

Sorry BenjV, I am an absolute beginner ... :) How to install your package? Should I set that link you put as a package source on synology as it is for the synology community?

marflao commented 3 years ago

Hi zapru,

go to https://github.com/BenjV/SYNO-packages/blob/master/Medusa%201.1%20Python%203%20noarch.spk and download the file.

Since Medusa is not working anymore for you I assume you won´t be able to create the backup file, or?

Hence go to your Syno "Package Center" and i) stop the "sickbeard-custom" package. ii) go to "Settings" => "General" and assure that the Trust level is set to "Any publisher" (and press OK or Cancel) iii) click on "Manual Install" and choose the downloaded *.spk file.

Once the Medusa package has been installed on your NAS you can enter the URL and access its UI. Now you have to set it up again (or use the last backup file you have).

p0psicles commented 3 years ago

I don't know the file structures for the sickbeard-custom package. But if he can locate the following files: main.db failed.db cache.db config.ini

And copy this over into his new folder. With changing the correct file ownership, he should be up and running.

BenjV commented 3 years ago

Those files can be found here: /var/packages/sickbeard-custom/target/var and should be copied to: /var/packages/medusa/target/var

And you should correct the permissions with: chown -R sc-medusa:medusa /var/packages/medusa/target/var

or with these 4 commands:

chown sc-medusa:medusa /var/packages/medusa/target/var/main.db
chown sc-medusa:medusa /var/packages/medusa/target/var/failed.db
chown sc-medusa:medusa /var/packages/medusa/target/var/cache.db
chown sc-medusa:medusa /var/packages/medusa/target/var/config.ini
p0psicles commented 3 years ago

It's config.ini, just in case they copy paste your commands

zapru commented 3 years ago

Works :) Thanks everyone :))) I still have to reset the permissions, because they won’t download the episodes.

BenjV commented 3 years ago

Downloading is done by the downloader( nzbget, DownloadStation, Transmission etc) and not by Medusa and has nothing to with Medusa unless you are using a Black Hole folder then that folder has to be granted permissions.

Permissions have to be granted to the download locations(s) and black hole locations via the group sc-download.

zapru commented 3 years ago

Hmmm I really don’t understand why it won’t download automatically or manually? I'm using DS, set up correctly. Do I need to write some more info to help?

Screenshot 2020-12-03 163902 Screenshot 2020-12-03 163642

once again, thank you all for your effort. you are great ...

p0psicles commented 3 years ago

Remove the /volume1

BenjV commented 3 years ago

Correct and Torrents must be a shared folder and the group sc-downloads must been given write access to that share and its subfolders.

zapru commented 3 years ago

Remove the /volume1

I did, but the same ... :(

zapru commented 3 years ago

the same permits are as before when everything worked (before 30.11.2020). so I don't understand, why isn't it working now?

zapru commented 3 years ago
Screenshot 2020-12-04 112957 Screenshot 2020-12-04 113107 Screenshot 2020-12-04 113230 - Copy Screenshot 2020-12-04 113137 - Copy
zapru commented 3 years ago
Screenshot 2020-12-04 113726