persepolisdm / persepolis

Persepolis Download Manager is a GUI for aria2.
https://persepolisdm.github.io
GNU General Public License v3.0
6.18k stars 651 forks source link

Snap version #703

Open dddeveloperrr opened 4 years ago

dddeveloperrr commented 4 years ago

Hello guys I wanted to know if you have any plan to release PDM in snap packages? that would make the life much easier for you and users. you make it once and users install and use in in any distro :)

alireza-amirsamimi commented 4 years ago

Hello I'm not fan of snap packages. I prefer Linux distributions package system. But I'll welcome if any one would like to create snap package for Persepolis :)

MahdiBaghbani commented 4 years ago

Hi @alireza-amirsamimi , I can try to make the Persepolis package available from both Snap and Flatpak. I just need some time to review your dependencies and installation paths.

alireza-amirsamimi commented 4 years ago

@MahdiBaghbani Thank you :)

dddeveloperrr commented 4 years ago

Hi @alireza-amirsamimi , I can try to make the Persepolis package available from both Snap and Flatpak. I just need some time to review your dependencies and installation paths.

Thanks a million, Im waiting for that😉

Aury88 commented 4 years ago

Hi @MahdiBaghbani I think I've a snapcraft.yaml with resolved dependencies but failed to find the entry point to run for the snap (see the bottom of the step 3 HERE). here my snapcraft.yaml:

name: persepolis
version: git
summary: Persepolis
description: |
  Persepolis is a download manager & a GUI for Aria2.
base: core18
confinement: devmode

parts:
  persepolis:
    stage-snaps:
      - youtube-dl/latest/stable
    plugin: python
    python-version: python3
    source: .
    stage-packages:
      - python-six
      - python3
      - python3-pyqt5
      - python3-requests
      - python3-setproctitle
      - python3-psutil

apps:
  persepolis:
    command: *************************
    plugs:
      - opengl
      - network
      - network-bind
      - x11
      - desktop
      - home

the ***** after "command" in the apps/persepolis section is the missing path (in other python program it is under the bin/ directory

MahdiBaghbani commented 4 years ago

That’s exactly where I stuck too, seems some scripts in those paths are executed different than what I think, I’m trying to read the sources before giving up on this :)

On Mon, Mar 16, 2020 at 8:50 PM Aurelio C. notifications@github.com wrote:

Hi @MahdiBaghbani https://github.com/MahdiBaghbani I think I've a snapcraft.yaml with resolved dependencies but failed to find the entry point to run for the snap (see the bottom of the step 3 HERE https://snapcraft.io/first-snap/python/linux/package). here my snapcraft.yaml:

name: persepolis version: git summary: Persepolis description: | Persepolis is a download manager & a GUI for Aria2. base: core18 confinement: devmode

parts: persepolis: stage-snaps:

  • youtube-dl/latest/stable plugin: python python-version: python3 source: . stage-packages:
  • python-six
  • python3
  • python3-pyqt5
  • python3-requests
  • python3-setproctitle
  • python3-psutil

apps: persepolis: command: ***** plugs:

  • opengl
  • network
  • network-bind
  • x11
  • desktop
  • home

the ***** after "command" in the apps/persepolis section is the missing path (in other python program it is under the bin/ directory

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/persepolisdm/persepolis/issues/703#issuecomment-599661767, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIMIGEAEXSV2HJJEGCKRBTRHZNVLANCNFSM4IZPGBBA .

-- https://about.me/mahdibaghbani?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb Mahdi Baghbani about.me/mahdibaghbani https://about.me/mahdibaghbani?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb

Aury88 commented 4 years ago

Hi @MahdiBaghbani , maybe we have to create/add a file for the startup from the system-wide installation like in this file

see also HERE

Aury88 commented 4 years ago

as said in the snapcraft forum there were no new progress so if someone want to help me or point me to other projects that solved similar situations or take the project I would be very grateful.

Aury88 commented 4 years ago

hi @MahdiBaghbani I was contacted by Daniel Llewellyn that made a PR on my persepolis repository. He says that the PR is enough to make a working snap but I'm having problems with snapcraft and i was not able to make the snap. Can you please test it? :pray: You need to extract the appending zip in the root directory (it will substitute the setup.py file and add a .snapcraft.yaml file) and from there launch snapcraft clean and snapcraft comands. The process takes some time (in my case 30 minutes). persepolis.zip tell me please if it works also for you.

MahdiBaghbani commented 4 years ago

Hi, Congrats! It worked for me :) took 25 minutes.

Thank you 😊

On Wed, Apr 15, 2020 at 7:42 PM Aurelio C. notifications@github.com wrote:

hi @MahdiBaghbani https://github.com/MahdiBaghbani I was contacted by Daniel Llewellyn that made a PR on my persepolis repository https://github.com/Aury88/persepolis/pull/1. He says that the PR is enough to make a working snap but I'm having problems with snapcraft. Can you please test it? 🙏 You need to extract the appending zip in the root directory (it will substitute the setup.py file and add a .snapcraft.yaml file) and from there launch snapcraft clean and snapcraft comands. The process takes some time (in my case 30 minutes). persepolis.zip https://github.com/persepolisdm/persepolis/files/4482019/persepolis.zip tell me please if it works also for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/persepolisdm/persepolis/issues/703#issuecomment-614098769, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIMIGBF2ZGMNOAPU5LHRHLRMXFFNANCNFSM4IZPGBBA .

-- https://about.me/mahdibaghbani?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb Mahdi Baghbani about.me/mahdibaghbani https://about.me/mahdibaghbani?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb

Aury88 commented 4 years ago

it's all thanks to Daniel Llewellyn.

now I will try to find what is the problem with my snapcraft behavior and then upload the snap in the snapstore... if it doesn't work I will ask to some snapstore admins to delete my persepolis registration from the store so you will be able to take the name and upload the snap

dddeveloperrr commented 4 years ago

@Aury88 @MahdiBaghbani @alireza-amirsamimi

watch this video https://www.youtube.com/watch?v=yA1nFvFFFkk ( start from 7:15 minutes of video) he says they have a automatic build system for snap packages that can automatically take the source code of any software from GitHub and build the software and push it on snap store automatically.

there is no need to build and upload manually. just a yaml file is needed in software's GitHub repository and you should hook the GitHub repository to their build system.

this is what i understood from video. maybe I'm wrong. just watch it yourself. thanks

Aury88 commented 4 years ago

@dddeveloperrr thank you! I already know that method; I usually prefer to test myself the builds locally before upload or make them auto-build on the store...that is to avoid bad user experience on the snap and avoid hurting the application reputation...but you are right... I can test directly the snap in the edge channel. The afternoon, if the online build will be successful, I will make the snap public

Aury88 commented 4 years ago

ok. it workish! Get it from the Snap Store

dddeveloperrr commented 4 years ago

Congradulations! you did it ;)

Aury88 commented 4 years ago

it's all thanks to Daniel Llewellyn that developed the yaml and Mahdi Baghbani that tested the building process...at the end I only host the source repository :rofl:

dddeveloperrr commented 4 years ago

I got an error when launching the software.

distro: manjaro desktop: xfce

image

Aury88 commented 4 years ago

That seems a confinement problem....you should be able to use the snap in devmode (warning this disable your security confinement for this snap): snap install persepolis --devmode

Aury88 commented 4 years ago

in the meantime I will try to find a solution, but, as you can see, I'm a novice...

Aury88 commented 4 years ago

hi @dddeveloperrr I did not find a solution but that message seems to be common to other snap...but we are lucky: Now I'm on ubuntu 20.04 and that message is also on my installation :rofl:

Are you able to launch persepolis or is it stucked on that error?

In the meantime I've uploaded a new version in the stable channel; Can you test it? :pray: It should have a menu integration (you should be able to launch it graphically, without the command line). I would have liked to test it more extensively before promoting it to the stable channel, but it solved an annoying bug with the app indicators and I preferred not to wait.

dddeveloperrr commented 4 years ago

Hi I updated Persepolis. now I have an icon in menu launcher. still getting errors and got persepolise crached. a log message and also a video is attached

log: Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed Traceback (most recent call last): File "/snap/persepolis/25/lib/python3.6/site-packages/persepolis/scripts/mainwindow.py", line 5228, in reportIssue osCommands.xdgOpen('https://github.com/persepolisdm/persepolis/issues') File "/snap/persepolis/25/lib/python3.6/site-packages/persepolis/scripts/osCommands.py", line 57, in xdgOpen file_manager = findFileManager() File "/snap/persepolis/25/lib/python3.6/site-packages/persepolis/scripts/osCommands.py", line 32, in findFileManager 'inode/directory']) File "/snap/persepolis/25/usr/lib/python3.6/subprocess.py", line 356, in check_output *kwargs).stdout File "/snap/persepolis/25/usr/lib/python3.6/subprocess.py", line 423, in run with Popen(popenargs, **kwargs) as process: File "/snap/persepolis/25/usr/lib/python3.6/subprocess.py", line 729, in init restore_signals, start_new_session) File "/snap/persepolis/25/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'xdg-mime': 'xdg-mime' Aborted (core dumped)

video: recc

Aury88 commented 4 years ago

Hi @dddeveloperrr, thank you for the bug report. I was able to reproduce the issue. In my case persepolis crash "only" when I try to launch "Report an issue" and "Help" in "Help" menu, but the rest seems to work...Is this the same for you? I don't know what is the expected behavior: are they suppose to open a popup window (like the other options) or a browser?...if the second it could be caused by snap confinement that forbids to launch external applications. I will check. :ok_hand:

dddeveloperrr commented 4 years ago

@Aury88 you are welcome. yes, same for me. Help and report an issue causes the crash. You guessed right. it tries to open a link in a browser.

see this error message: File "/snap/persepolis/25/lib/python3.6/site-packages/persepolis/scripts/mainwindow.py", line 5232, in persepolisHelp osCommands.xdgOpen('https://github.com/persepolisdm/persepolis/wiki') File "/snap/persepolis/25/lib/python3.6/site-packages/persepolis/scripts/osCommands.py", line 57, in xdgOpen

persepolis tries to open https://github.com/persepolisdm/persepolis/wiki link but it gets crashed

Aury88 commented 4 years ago

@dddeveloperrr I think I have solved the issue with the crashing menus. On my ubuntu now both of them are able to open firefox on the requested webpages. At the moment I've uploaded only on the edge channel so you have to snap refresh persepolis --edge to try the new build. the Qt Session management error was not solved, but it seems only noise without consequence on the application behavior, therefore it will not be an immediate priority. Please, let me know if the situation has resolved for you too. Thank you!

nianik5098 commented 4 years ago

Hello there, persepolis crashed everytime i tried to open it in my ubuntu 16.04 machine. (normal installation)

then i tried the snap version (both stable and edge). opens correctly. after adding url it shows that it is downloading the file and shows download finished notification as well. but doesn't actually download anything.

the normal installation created a "persepolis" folder in Downloads. snap version does not do that.

out of disappointment, i installed persepolis on my friend's windows machine to test. it worked so great that my friend stopped using the cracked version of IDM. :D Best of luck, guys!

Zzombiee2361 commented 4 years ago

Hi! What about the flatpak version?

MahdiBaghbani commented 4 years ago

@nianik5098 Hi, I have same problem now, it was working last month but now you are right, it doesn't downloading despite showing, I'm investigating the issue.

@Zzombiee2361 Hi, yes flatpak version is in my todo list, I'm currently so busy to do it so I'm not sure if I'm ever going to do this in coming 2 months, @Aury88 did a great job with snap package so I guess by using his script anyone with free time can port it to flatpak build system.

Aury88 commented 3 years ago

Hello there, persepolis crashed everytime i tried to open it in my ubuntu 16.04 machine. (normal installation)

then i tried the snap version (both stable and edge). opens correctly. after adding url it shows that it is downloading the file and shows download finished notification as well. but doesn't actually download anything.

the normal installation created a "persepolis" folder in Downloads. snap version does not do that.

out of disappointment, i installed persepolis on my friend's windows machine to test. it worked so great that my friend stopped using the cracked version of IDM. :D Best of luck, guys!

Hi @nianik5098. thankyou for your bugreport.

I was partially able to reproduce the issue: in my snap installation it did not created a "persepolis" folder in Downloads but created these files: "Videos", "Documents", "Others", "Compressed", "Audios". I was not able to find the downloaded file...I don't know why ... I thought the problem was between the keyboard and the chair but your bug report made me rethink this... In my case the downloaded file is effectively downloaded somewhere (I don't know where) and i solved with this tedious procedure:

do you find them?

PS: I don't know if i will keep to maintain the snapped version. I'm not a programmer/developer and so i'm out of my comfort zone with all this stuff...I'm not even able to use properly git so every change in the main repository i don't know how to move them in my personal/building repository keeping my changes so probably i will stop update the snap

nianik5098 commented 3 years ago

@Aury88 Sorry but I stopped running Ubuntu 16.04 after 20.04 lts was released. Persepolis dm works fine on newer Ubuntu releases. I tried it in my test machine with Pop Os 20.04 and it was great.

Edit: Now I remember that while downloading big fat iso files I had to restart the download action several times. Download was automatically stopping occasionally.

Aury88 commented 3 years ago

@nianik5098 sorry to disturb you, I have only a doubt: do you tested the snap version in Ubuntu 20.04 and PopOs 20.04 or do you tested the original version (from repository/compiled from source)?

I will try investigate the downloading issue with big file. Thank you again for your bugreport

nianik5098 commented 3 years ago

Hello @Aury88 , nice to hear from you again. It was installed from the ppa.

dtantono commented 2 years ago

it is almost 2 years. is there a progess for this?

Aury88 commented 2 years ago

@dtantono no, sorry and won't be any time soon. after not having received an answer to the request of some snapcrafter to replace me in the maintenance of the snap (I'm not a dev/programmer and I don't even know how to use github so for me it is very hard) I asked to completely remove the snap from the snapstore. the PPAs of your distros at this point will certainly be more up to date than the snap version. I'm sorry, I tried but it is a task beyond my current knowledge and, also for this reason, impossible for me to maintain. it is a pity that the application developers are not interested. from what I have seen, once the source is well set, the snap packaging procedure is automatic and does not require any commitment or intervention from the developers.