Page 1 of 1

snap (snapd)

Posted: 15 Jul 2018, 13:02
by rych
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)

snap (snapd)

Posted: 16 Jul 2018, 08:25
by tome
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.

snap (snapd)

Posted: 18 Jul 2018, 01:36
by fulalas
Python dependencies are hell! Image

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

snap (snapd)

Posted: 19 Jul 2018, 08:26
by ncmprhnsbl
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

snap (snapd)

Posted: 21 Jul 2018, 05:56
by rych
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)

snap (snapd)

Posted: 22 Jul 2018, 18:24
by tome
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.

snap (snapd)

Posted: 28 Jul 2018, 05:54
by rych
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.

snap (snapd)

Posted: 04 Jan 2024, 22:36
by tome
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).

snap (snapd)

Posted: 18 Jan 2024, 06:34
by rych
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

snap (snapd)

Posted: 18 Jan 2024, 10:36
by Blaze
tome wrote:
04 Jan 2024, 22:36
pip2tgz
:book:

snap (snapd)

Posted: 18 Jan 2024, 11:01
by tome
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/

snap (snapd)

Posted: 19 Jan 2024, 10:54
by M. Eerie
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.