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

.app bundles in archives mounted with mountarchive do not work #150

Closed
probonopd opened this issue Feb 16, 2021 · 14 comments
Closed

.app bundles in archives mounted with mountarchive do not work #150

probonopd opened this issue Feb 16, 2021 · 14 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@probonopd
Copy link
Member

.app bundles in archives mounted with mountarchive do not work yet, the user has to copy out the application first.

We should make it work.

Example: https://github.com/helloSystem/Utilities/archive/master.zip

Why?

Execute permission is there, application can be executed from the terminal.

-r-xr-xr-x  0 root  wheel    12K 16 Feb. 18:49 /var/run/user/1001/_home_user_Desktop_Utilities-master.zip/Utilities-master/3D Printing/FreeCAD.app/FreeCAD
@probonopd probonopd added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Feb 16, 2021
@kettle-7
Copy link
Contributor

kettle-7 commented May 1, 2021

How do you use mountarchive?

@probonopd
Copy link
Member Author

When it works, then just download the zip above, double-click it, and be able to execute the applications therein. If that doesn't work yet, then we have a bug ;-)

@kettle-7
Copy link
Contributor

kettle-7 commented May 2, 2021

I think it mounts it, but doesn't open the mounted folder.

Edit:

No, it can't mount it because it doesn't have write access to /run

@kettle-7

This comment has been minimized.

@kettle-7
Copy link
Contributor

kettle-7 commented May 2, 2021

My Fonts.tar.gz works fine, I think it's something about that particular zip file, because running unzip from the command line didn't actually extract anything.

@kettle-7

This comment has been minimized.

@kettle-7
Copy link
Contributor

kettle-7 commented May 2, 2021

archivemount -f -o readonly,nonempty,allow_root Utilities-master(1).zip /var/run/user/1001/Utilities-master(1).zip
2
launch Filer /var/run/user/1001/Utilities-master(1).zip
# Descending into "/Applications/Office"
# Descending into "/Applications/Utilities"
# Descending into "/Applications/Video"
# Descending into "/Applications/3D Printing"
# Descending into "/Applications/Developer Preview"
# Descending into "/Applications/Graphics"
# Descending into "/Applications/Preferences"
# Descending into "/Applications/Developer"
# Descending into "/Applications/Audio"
# Descending into "/Applications/Autostart"
################### Checking "/System/Filer.AppDir/AppRun"
# Found "/System/Filer.AppDir/AppRun"
Took 8 milliseconds to find candidates via the filesystem
Candidates: (QFileInfo(/System/Filer.AppDir/AppRun))
Selected candidate: "/System/Filer.AppDir/AppRun"
QProcess: Destroyed while process ("archivemount") is still running.

@probonopd
Copy link
Member Author

probonopd commented May 2, 2021

The user with the ID 1001 should have write access to /var/run/user/1001/ (at least this was what I was assuming); are you saying this is not the case @linuxkettle?

@kettle-7
Copy link
Contributor

kettle-7 commented May 2, 2021

No, my UID is 1000, so no 1000 directory was created.

Also, I can't mount any ZIP archives even after fixing that problem. Tarballs work fine, but when I run mountarchive on a ZIP folder, it opens Filer but doesn't mount the archive, so I'm left with a Filer window showing a folder in it, but seconds afterwards it says that the folder doesn't exist.

Does this mean the archive is getting unmounted?

@probonopd
Copy link
Member Author

probonopd commented May 2, 2021

No, my UID is 1000, so no 1000 directory was created.

Interesting!
On which system (exact version) does this happen?

Does this mean the archive is getting unmounted?

I don*t know, but mount should tell you.

@kettle-7
Copy link
Contributor

kettle-7 commented May 2, 2021

It's because I created a new user, the live one was 1001.

I installed it differently because I needed to keep some of the files on my HDD, and the installer stalls when I try to install to a USB (because of issue #200). Although the Users app should create a runtime directory for the new user.

@probonopd
Copy link
Member Author

Good point. What piece of software is normally resposible for creating those directories?

@kettle-7
Copy link
Contributor

I don't know, in Linux systemd does it, but on FreeBSD it seems to be a do-it-yourself-or-else thing. The odd thing is, tar archives sometimes work, and every archive format except zip mounts on /var/run/user/1001 anyway.

Usually though, tar archives just say "Device not configured." and any attempt to do anything in them results in that error message being shown again.

@probonopd
Copy link
Member Author

probonopd commented May 22, 2021

in Linux systemd does it

Interesting. So is this whole /var/run/user/$UID thing a Fedora-ish thing rather than a Unix-ish thing? Then we may want to use something else if there is a more Unix-native way to have a per-user temporary location.

Possibly this is related toXDG_RUNTIME_DIR?
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html says

There is a single base directory relative to which user-specific runtime files and other file objects should be placed. This directory is defined by the environment variable $XDG_RUNTIME_DIR.

But it does not seem to say what is supposed to create this directory. Maybe on FreeBSD just nothing creates this user-specific directory?

Maybe it would be more robust (and simpler) to just use /tmp/$USER/ instead?

Related: FreeSlave/standardpaths#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants