SynoCommunity / spksrc

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

Debian chroot #1910

Closed superpippo82xxx closed 1 year ago

superpippo82xxx commented 8 years ago

Debian chroot not working good after dsm6 update. After update service start and i can ssh but i can't change anything form webpage. Overview page is always loading... and no service are listed. Thanks

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

cytec commented 8 years ago

see https://github.com/SynoCommunity/spksrc/issues/1880#issuecomment-153662105 DSM 6 is still in BETA and there are no toolchains provided by synology...

doychi commented 8 years ago

I notice the tool chain has been released for DSM 6 (https://sourceforge.net/projects/dsgpl/files/).

I'm not familiar with C, but would like to help when and where I can.

cytec commented 8 years ago

@doychi those are beta toolchains, we are not going to use them until the final version is out... even if that happened most likely you'll have to wait some time till a dev updates to 6.0 and recompiles packages...

R1skNt commented 8 years ago

@Dr-Bean the problem still exists after the last update 8.4-7 of chroot

Dr-Bean commented 8 years ago

@r1sknt Not very surprising, the recent package update has no relation with DSM6.

mcondarelli commented 8 years ago

Are there any news on this? The stable toolchains for DSM-6.0 are out (see: SourceForge link), but I guess some developer will have to (at least) recompile. I am not sure this is just a recompilation issue, something might have changed in the interfaces. I am willing to help (I'm interested mainly in the Avoton port for my DS415+), but I know nothing about the graphical interfaces on DSM.

Toka69 commented 8 years ago

Hello. I try to recompile Debian-chroot for DS414 Armadaxp. I installed Ubuntu in Virtualbox. However, the organization of the toolchain does not correspond any more to the guide of the developer based on DSM5.0 What complicates me the task. If I success, I would announce my results here.

Toka69 commented 8 years ago

For the moment my tries are fruitless. If somebody manages to compile and to make the package with the toolchain for DSM 6 I am interested. While waiting for the update of the repository. Thank you.

ghost commented 8 years ago

how fix this, work around? :(

Ulli2k commented 8 years ago

any solution available?

Toka69 commented 7 years ago

Hi After months, I retry to find a solution to automaticaly launch some services in chroot when the NAS boot. And you know what, I tried and it works great. So, the web based demon configuration is not necessary. In DSM 6, go to -> control panel -> Task Scheduler Then create a Triggered Task In the General section select a name for the task, for user select an admin user, for event select Boot-up and ticked Enabled. In the Task Settings section, insert in Run command :

CHROOT=/volume1/@appstore/debian-chroot/var/chroottarget mount -o bind /dev $CHROOT/dev mount -o bind /proc $CHROOT/proc mount -o bind /dev/pts $CHROOT/dev/pts mount -o bind /sys $CHROOT/sys cp /etc/resolv.conf $CHROOT/etc/resolv.conf cp /etc/hosts $CHROOT/etc/hosts

below, an example to launch postgresql previously installed

chroot $CHROOT /etc/init.d/postgresql start

Of course, at the first line volume1 must be replaced by the volume where the packages are installed.

teejay-87 commented 7 years ago

@Toka69 Thank you very much! Finally, I managed to get it working on startup!

But, I'm not a linux expert.

I want to ask the following: Can those mountings affect the functionality of DiskStation in any way? AFAIK, you are mapping important "system" path of Linux to other locations...

belkone commented 7 years ago

Is there a chance to rectify the problem with the Web GUI?

mcondarelli commented 7 years ago

My feeling is SynoCommunity is not working on DSM6 at all. At least I cannot see any sign of activity here on github. I sincerely hope to be proved wrong. This is a real shame because debian-chroot is (was?) a very useful add-on. I am currently holding to DSM 5.2 for this very reason, but I will have to upgrade, sooner or later. Apparently everybody jumped on "Docker" bandwagon.

belkone commented 7 years ago

I feel the same, such a sad truth.. ;< I will try to find a solution for this problem, let You know, if I solve this issue.

mcondarelli commented 7 years ago

@belkone This specific seems connected to some permission/executable change (see milanaleksic comment on https://github.com/SynoCommunity/spksrc/issues/2207), but the bad thing is I see no trace of DSM6 in spksrc/kernel.

belkone commented 7 years ago

@mcondarelli I solved this issue, in DSM6 was made a change in 3rd party packages URL.

For fix SynoCommunity's Debian-Chroot Web GUI on DSM6: We have to edit file: /var/packages/debian-chroot/target/app/debian-chroot.js and change lines, from: "url": "3rdparty/debian-chroot/debian-chroot.cgi/direct/router", to: "url": "/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/router", and: 'url': '3rdparty/debian-chroot/debian-chroot.cgi/direct/poller', to: 'url': '/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/poller', After that, web interface is working again ;)

Edit: workaround to the problem of closing UI: https://github.com/SynoCommunity/spksrc/issues/1910#issuecomment-257558402

teejay-87 commented 7 years ago

@belkone Thanks for the fix! Still the window refuses to close :D

belkone commented 7 years ago

@teejay-87 you're welcome! I will try to fix closing the window when I find some time, then I will post solution here ;)

mcondarelli commented 7 years ago

@belkone There are actually two instances of "3rdparty/debian-chroot/debian..." I changed them into:

debian-chroot.js:    "url": "3rdparty/debian-chroot/debian-chroot.cgi/direct/router",
debian-chroot.js:    'url': '3rdparty/debian-chroot/debian-chroot.cgi/direct/poller',

(without leading slash)

belkone commented 7 years ago

@mcondarelli I already added 'Pooler' line to my fix-comment ;)

Matioupi commented 7 years ago

Thanks for the workaround, this solves the UI with the infinite refresh. Any news on the "close" capability ?

belkone commented 7 years ago

@Matioupi I had no time to take care of this :( at the moment a temporary solution is simple: just reload the DSM's webpage and Chroot UI disappears 😛

Matioupi commented 7 years ago

Commenting out line 102 to 109 of debian-chroot.js make the close button functionnal, so the issue starts there. I'm not able to tell if this dirty fix has other consequences

// onClose: function () { // if (SYNOCOMMUNITY.DebianChroot.AppWindow.superclass.onClose.apply(this, arguments)) { // this.doClose(); // this.mainPanel.onDeactivate(); // return true; // } // return false; // },

Edited : only changing the return false to return true make the close button functionnal, i case it helps gurus to track down the issue in first place

belkone commented 7 years ago

@Matioupi nice job 👍 but we cannot only return true, because onClose event results: VM1689:559 Uncaught TypeError: Cannot read property 'setValue' of null(…)

I think changing onClose() like below, is a sufficient solution (does not lead to javascript errors):

onClose: function () { 
    this.doClose();
    this.mainPanel.onDeactivate();

    return true;
},

@teejay-87 here's solution for you ;)

Matioupi commented 7 years ago

why do you remove the call to the parent class ?

SYNOCOMMUNITY.DebianChroot.AppWindow.superclass.onClose.apply(this, arguments);

belkone commented 7 years ago

I think it's not important here, because we're calling doClose() and onDeactivate() directly on the calling element (this) but I may be wrong.

sorcer1122 commented 7 years ago

Guys, you are amazing!!!

teejay-87 commented 7 years ago

@belkone I'm reading now, thanks for your solution!

I know Sencha a bit (Syno interface is made with an old Sencha version), and I think your solution is acceptable and it has probably no other consequences.

Probably something broke with superclass call (apply simply calls a function with specified scope and arguments) in DSM 6.0, but the JS source is compacted so it's hard to find what is failing.

But, as you already stated, I think that calling doClose() and onDeactivate() on this will suffice.

monochromec commented 7 years ago

Issue reared its ugly head again in DSM 6.0.2-8451-2. Upgrade to 6.0.2-8451-9 didn't help: "Overview" progress indicator keeps spinning and "Services" tab is empty. belkone's workaround unfortunately didn't help.

More than happy to provide additional information, just let me know.

Masterfion commented 7 years ago

Hello :) Same here !

ph3x commented 7 years ago

I'm also affected by the issue described by monochromec. System is a DS412+ with DSM 6.0.2-8451 Update 9

If any logs can be provided I'm glad to help.

Cheers, Christian

computaholic commented 7 years ago

Any news on this? I am also affected. I am happy to debug if anything is needed.

EDIT: Is there any way to register services without the gui?

lepennec commented 7 years ago

Dear all, I've made the fixes proposed by @belkone and they seem to work for me... (DSM 6 and DS716+II) Erwan

jpearn commented 7 years ago

@belkone fix working on DSM 6.1 thanks !

bonzini commented 7 years ago

DSM 6.1 here, I also needed to ./pip install click from /volume1/@appstore/debian-chroot/env/bin; after doing that it worked.

popplegit commented 7 years ago

Also seeing the infinite 'loading' problem for debian-chroot, with DSM6.1 on a DS716+ii I've tried the fixes above (3rdparty -> /webman/3rdparty, edit onClose, and pip install click) but no joy. Any suggestions please how even to investigate this? Couldn't find anything useful in /var/log Thanks!

popplegit commented 7 years ago

less haste, less red face... Working fine following reboot!

nimbling commented 7 years ago

Following these edits AND A REBOOT this now kinda-sorta works for me, too :)

jaylik commented 7 years ago

Hmm... still, :5000/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/router 405 (Not Allowed)

Flash226 commented 7 years ago

I need autostart cron service after restart DSM. How can I do it?

ElanHasson commented 7 years ago

you have to login and logout.

bruor commented 7 years ago

I'm on a DS1512+ DSM 6.1.1-15101 Update 4

I've attempted to make the edits here to get things working by replacing the lines dealing with 3rdparty urls and the change that belkone suggested for making the close function work.

However, now the debian chroot app won't even open within DSM. Anyone got any ideas on what I might need to do to make it work?

I manually installed pip as root, and did a "pip install click" but even after reboot the chroot app won't launch.

EDIT: after figuring out that I had to run pip locally inside the flexget env to get the qbittorrent plugin to work, I attempted to run "pip install click" from within the debian chroot package target folders but there was no change in behavior after a reboot.

ghost commented 7 years ago

@bruor I have just python installed from package center. In /volume1/@app*/python/bin is placed the pip binary. With ./pip install click and reboot my gui runs without freezer (and with webman workarounds)

bruor commented 7 years ago

My @app* put me in @appstore. I installed click as root and rebooted. No change in UI, the debian logo shows up at the top and shows the little spinning symbol indefinitely.

ghost commented 7 years ago

"*" is the symbol for wildcard, @appstore is correct. Du you install click from python binaries? Im not sure but i think python package has to be installed for chroot. If you edited the close function in debian-chroot.js, please check the brackets {} and the comma after closing bracket " }, ". If there is a error in this syntax, chroot will not start. I had similar issues in other js-files on my raspberry. Compare your syntax with the workaround from post above.

bruor commented 7 years ago

I'm not sure what that means. At this point I've SSH'd an and installed click in that shell, within the app store folder, and within the debian chroot app folder.

I've also logged into the chroot and made sure it's installed there.

I'll check the markup on that bracket later, currently the chroot works, it's loading all my services I just can't use the Synology app to admin it etc. The startup services I defined for the chroot on DSM5 are auto starting without issue.

ghost commented 7 years ago

Ok my fault, only webgui didn't start, i thought chroot didn't run at all.

VinxItak commented 6 years ago

DSM 6.1.3-15152 Update 3, still have the problem (overview is loading). 3rdparty -> /webman/3rdparty : no change edit onClose : works, i can close the debian chroot window pip install click : no change reboot : no change

AGagarin commented 4 years ago

3rdparty -> /webman/3rdparty
edit onClose pip install click

on the top of Auth.py add

import sys

For src/debian-chroot update all the files above. WHEELS = pyextdirect==0.3.1 flask click Werkzeug Jinja2 itsdangerous

Have checked on DS918+ apollolake. XPenology 6.2.3 Gui is not displaying updates correctly need to fixed, but service status is Ok