snap (snapd)

If you are looking for a specific 64-bit package and you can't find it in any of the 64-bit repos, please post a request for it here
rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

snap (snapd)

Post#1 by rych » 15 Jul 2018, 13:02

Could someone please help me make my Porteus snap-ready if possible? It's installable on linux
https://docs.snapcraft.io/core/install, I hope it can be installed on porteus too.

The software I've been trying to install, krop, which I need to crop my pdf pages, is offered as a snap. Otherwise I've spent 2 days already trying to install requirements for krop: python3 (easy using miniconda), pyqt5 (okay), python-poppler-qt5 and that's where I hit the wall. And that's not even the last dependency. Also the python 3 folder is now 1GB. I hope going the snap bundle way will be easier and more economical.

(I'd also be interested to know how people crop pdf pages otherwise, or to find a krop porteus module -- but it's perhaps too exotic)

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

snap (snapd)

Post#2 by tome » 16 Jul 2018, 08:25

I tried someday installing anbox, but it requires to much time for me.
rych wrote:
15 Jul 2018, 13:02
I'd also be interested to know how people crop pdf pages otherwise
I use EBookDroid - pdf book reader for Android. I can upload my taps settings if you wish.
You have mind and feelings. Be wise and clever.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

snap (snapd)

Post#3 by fulalas » 18 Jul 2018, 01:36

Python dependencies are hell! Image

What about using Acrobat with Wine? A friend of mine told me recently that it works.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

snap (snapd)

Post#4 by ncmprhnsbl » 19 Jul 2018, 08:26

here's one to try: pdfshuffler-0.6.0+deps-x86_64.xzm 692 KB
it's pretty basic ie cropping requires entering percentages into boxes..(have your ruler handy ;) )
module contains:

Code: Select all

PyPDF2-1.26.0-x86_64-1_SBo.tgz
pdfshuffler-0.6.0-x86_64-4_slonly.txz
pygobject-2.28.7-x86_64-2.txz
pypoppler-0.12.1-x86_64-4_SBo.tgz
notes:
PyPDF2 and pypoppler needed to be build against icu4c and poppler versions present in porteus
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

snap (snapd)

Post#5 by rych » 21 Jul 2018, 05:56

fulalas wrote:
18 Jul 2018, 01:36
What about using Acrobat with Wine?
I've tried a couple of Acrobat portable solutions. Both kind of work until it comes to the inner dialogs where the GUI is useless maybe due to fonts/DPI incompatibility with my wine (wine-3.11-x86_64-1sg.xzm, 0050-compat32-multilib-ftw.xzm)
Image Image
So, @fulalas, thanks, but perhaps your friend also knows how to deal with Adobe's peculiar fonts/GUI on Wine?!

Until then I'm going to concentrate on sorting out python3 packages in hope to get the krop and pdfshuffler working... I'll be posting my progress/problems here.

(It's interesting that no one is even commenting on snapd -- I guess that's not promising at all)

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

snap (snapd)

Post#6 by tome » 22 Jul 2018, 18:24

I was able to run krop.krop-app but it requires some modifications:
1. Working kernel (I used kernel from slax based on debian) because /sys/cgroups/freezer was missing, this kernel doesn't work with porteus initrd, all .xzm was renamed to slax .sb.
2. Systemd must be started at boot - default in aporteus from neko (snaps require many mounts - main problem)
4. I used snapd from Manjaro repo.
5. Download size was ca 90MB core.snap and 90MB krop.snap (.snap can be renamed to .xzm to see what is inside)
6. systemd for slackware - https://github.com/Dlackware/systemd
7. snapd without systemd on potreus slackware allows only download snaps but not install
Image
https://www.dropbox.com/s/vms03x1hgks00 ... 8.png?dl=1

krop is also available via slakfinder.org but I don't know to handle it with python.
You have mind and feelings. Be wise and clever.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

snap (snapd)

Post#7 by rych » 28 Jul 2018, 05:54

ncmprhnsbl, thanks for the pdfshuffler-0.6.0+deps-x86_64.xzm. It works and crops! Which is remarkable given the time I've spent so far just trying to even install (prerequisites to) another python program, krop. It freezes often when I click too much on the GUI, so needs a fresh restart every now and then. But, actually on my system even PCManFM freezes sometimes. Another problem with pdfshuffler is that it throws away all the bookmarks when it saves the cropped file. Also, it's a python 2.7 module. Anyway, thank you so much.

tome, that's astonishing that you've managed to make snapd work given the modifications you had to use. I couldn't imagine it was going to be so serious. With that complexity it's way too difficult for me. Not sure if snapd has a useful future on porteus. Thanks for investigating.

My own progress is lacking. I've tried different approaches to python3 installation, and chasing python dependencies, and anyway I get stuck at poppler-qt5 -- there is no ready binary for python 3.6 so I have to build it myself. Which proves to be a project on its own. I'm not sure I can tackle it at this stage without spending a lot of time.

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

snap (snapd)

Post#8 by tome » 04 Jan 2024, 22:36

I built krop but 003-kde5.xzm must be activated under your DE or as your default DE.
krop-0.6.1_e96d42b-if-kde-2024-01-04_tm.xzm 5.6 MB tested on Porteus 5.01
https://www.dropbox.com/sh/gdzuwmrramlv ... MrUra?dl=0

Some packages come from Slackware repositories (patches), some are created by pip2tgz (updates).
You have mind and feelings. Be wise and clever.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

snap (snapd)

Post#9 by rych » 18 Jan 2024, 06:34

tome wrote:
04 Jan 2024, 22:36
krop-0.6.1_e96d42b-if-kde-2024-01-04_tm.xzm 5.6 MB tested on Porteus 5.01
Oh, this is beautiful, thank you! There was no need for me to activate any extra modules, even though I'm on OpenBox: maybe because I do have some Qt5 subsystem already activated at boot anyway. Well done! I hope you don't mind I've added your module to "our" (yes, there are already 5 subscribers including myself :) PorteuS/X telegram repository at https://t.me/PorteusX/24/25

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

snap (snapd)

Post#10 by Blaze » 18 Jan 2024, 10:36

tome wrote:
04 Jan 2024, 22:36
pip2tgz
:book:
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

snap (snapd)

Post#11 by tome » 18 Jan 2024, 11:01

rych wrote:
18 Jan 2024, 06:34
I hope you don't mind I've added your module to "our"
Yes, I don't mind.

If you wish to build krop only from slackware packages, these or newer are required:
krop-0.6.1_e96d42b-x86_64-2_dce
PyPDF2-1.26.0-x86_64-1_dce
PyQt5-5.15.2-x86_64-5
python3-pyqt-distutils-0.7.3-x86_64-1_dce
python-poppler-qt5-21.1.0-x86_64-1_dce
sip-4.19.25-x86_64-5

And to reduce the size delete /usr/lib64/python2.7

Blaze wrote:
18 Jan 2024, 10:36
pip2tgz
pip2tgz: https://codeberg.org/h3xx/pip2tgz or https://github.com/duncan-roe/pip2tgz (at slackbuilds) converts projects from: https://pypi.org/
You have mind and feelings. Be wise and clever.

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

snap (snapd)

Post#12 by M. Eerie » 19 Jan 2024, 10:54

I'm late to the party, but I have in my notes a way to convert from a snap package.

Go to https://search.apps.ubuntu.com/api/v1/package/<package>
and download <package>

Mount it, an then you can strip an repack it at will.

Example with codium:
https://search.apps.ubuntu.com/api/v1/package/codium
Download codium.snap.

Then

Code: Select all

sudo mount -t squashfs -o ro codium.snap /tmp/codium
I leave it here in case it is useful for other cases.
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Post Reply