gpodder-sailfish icon indicating copy to clipboard operation
gpodder-sailfish copied to clipboard

OPML export fails/complicated due to SailJail

Open RaphaelWimmer opened this issue 1 year ago • 6 comments

Current Sailfish OS versions enforce sailjail/firejail rules. When one tries to export the list of podcasts into an OPML file, gpodder asks for a filename (i.e. does not present a folder selection screen). The file is then saved into the user's home directory with a ".opml" extension. However, the exported file never reaches the actual home directory but stays in the sailjail/firejail container and is lost when gpodder is closed. As far as I understand the issue, gpodder would either

  • a) need a SailJail profile with an explicit permission to access the home directory or (preferrable)
  • b) need to export to one of the directories listed in /etc/sailjail/permissions/UserDirs.permission (e.g., Documents, Downloads, or Music) or to the SD card

Workaround: enter Documents/export.opml in the file name field when exporting the podcasts.

Alternative workaround (tried this first before looking into permissions; adjust the path to only get the .opml file you want):

PID=$(firejail --list | grep gpodder | cut -d: -f 1 )
firejail --cat=$PID /home/*/*.opml > /tmp/podcasts.opml

RaphaelWimmer avatar Oct 20 '24 22:10 RaphaelWimmer

Interesting, I guess because I have it installed over many versions I have more permissions grandfathered in, adding a Sailjail profile has been on my list of things I want to get to for a while, just didn't have priority since things seemed to be working regardless.

Can you explain a bit more why you think b is preferable to a?

Keeper-of-the-Keys avatar Oct 21 '24 00:10 Keeper-of-the-Keys

My view is that a is preferable since I also want to allow people to set their own custom download location and I am not aware of SFOS/Sailjail prompting the user for additional permissions only when needed.

Keeper-of-the-Keys avatar Oct 30 '24 09:10 Keeper-of-the-Keys

My view is that a is preferable since I also want to allow people to set their own custom download location and I am not aware of SFOS/Sailjail prompting the user for additional permissions only when needed.

Yes, you are right. Option b) seemed just to be the easier option.

RaphaelWimmer avatar Oct 30 '24 11:10 RaphaelWimmer

FYI - It turns out that it has to be a combination of your fix and my fix because with SailJail ${HOME} is not accessible, I hope to merge soon and release a very long overdue release full of fixes.

Keeper-of-the-Keys avatar Dec 08 '24 13:12 Keeper-of-the-Keys

Thanks for the update! I'm also following your SailJail journey on the SFOS forums (link to improve discoverability for others having fun with SailJail).

RaphaelWimmer avatar Dec 08 '24 13:12 RaphaelWimmer

As I'm sure you know the specific issue was resolved using the "Documents workaround" in 4.17.4

Explicit SailJail config is still WIP, I think I'm only closing this when #213 merges.

Keeper-of-the-Keys avatar May 07 '25 23:05 Keeper-of-the-Keys