Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap version #703

Open
dddeveloperrr opened this issue Sep 23, 2019 · 33 comments
Open

Snap version #703

dddeveloperrr opened this issue Sep 23, 2019 · 33 comments
Labels

Comments

@dddeveloperrr
Copy link

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
Copy link
Member

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
Copy link

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
Copy link
Member

@MahdiBaghbani
Thank you :)

@dddeveloperrr
Copy link
Author

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
Copy link
Contributor

Aury88 commented Mar 16, 2020

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
Copy link

MahdiBaghbani commented Mar 16, 2020 via email

@Aury88
Copy link
Contributor

Aury88 commented Mar 19, 2020

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
Copy link
Contributor

Aury88 commented Apr 4, 2020

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
Copy link
Contributor

Aury88 commented Apr 15, 2020

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? 🙏
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
Copy link

MahdiBaghbani commented Apr 15, 2020 via email

@Aury88
Copy link
Contributor

Aury88 commented Apr 16, 2020

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
Copy link
Author

dddeveloperrr commented Apr 20, 2020

@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
Copy link
Contributor

Aury88 commented Apr 24, 2020

@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
Copy link
Contributor

Aury88 commented Apr 24, 2020

ok. it workish!
Get it from the Snap Store

@dddeveloperrr
Copy link
Author

Congradulations! you did it ;)

@Aury88
Copy link
Contributor

Aury88 commented Apr 24, 2020

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 🤣

@dddeveloperrr
Copy link
Author

I got an error when launching the software.

distro: manjaro
desktop: xfce

image

@Aury88
Copy link
Contributor

Aury88 commented Apr 24, 2020

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
Copy link
Contributor

Aury88 commented Apr 24, 2020

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

@Aury88
Copy link
Contributor

Aury88 commented May 1, 2020

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 🤣

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? 🙏
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
Copy link
Author

dddeveloperrr commented May 1, 2020

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
Copy link
Contributor

Aury88 commented May 2, 2020

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. 👌

@dddeveloperrr
Copy link
Author

dddeveloperrr commented May 2, 2020

@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
Copy link
Contributor

Aury88 commented May 3, 2020

@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
Copy link

nianik5098 commented Jul 2, 2020

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
Copy link

Hi! What about the flatpak version?

@MahdiBaghbani
Copy link

@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
Copy link
Contributor

Aury88 commented Sep 5, 2020

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:

  • after the finished download go in the downloaded file list in the "All downloads" persepolis window,
  • right mouse click on the downloaded file in the list and select "move selected downloaded files to another folder"
  • select a desired folder (I put them all in download folder)
  • now you should find the downloaded files in the desired folder with your file manager

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
Copy link

nianik5098 commented Sep 5, 2020

@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
Copy link
Contributor

Aury88 commented Sep 6, 2020

@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
Copy link

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

@dtantono
Copy link

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

@Aury88
Copy link
Contributor

Aury88 commented Jul 31, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants