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

EXTERNAL_FILES_DIR encompasses userspace files #1073

Open
giantclambake opened this issue Apr 10, 2023 · 0 comments
Open

EXTERNAL_FILES_DIR encompasses userspace files #1073

giantclambake opened this issue Apr 10, 2023 · 0 comments
Assignees

Comments

@giantclambake
Copy link

giantclambake commented Apr 10, 2023

linux / PLATFORM=x86-64 /amiberry 5.6.1 (github clone)

Using strace, I see amiberry references $PWD when launched to find it's support files

Premise;

The support 'data' files for amiberry itself, might be typically found somewhere like '/usr/share/Amiberry/data'

The other support directories/files (conf/, controllers/, inputrecordings/, kickstarts/, nvram/, savestates/, screenshots/ etc) are pretty much user configurations/files, and not 'system wide' as such like above data dir. These dirs/files might typically be found in /home/username/Amiberry/

If one sets the env variable EXTERNAL_FILES_DIR=/usr/share/Amiberry , the amiberry binary treats that as the source dir for all required directories/files (including those that would typically reside in user's $HOMEDIR)

Possibly the variable namespace 'EXTERNAL_FILES_DIR' seems vulnerable to me, and something like 'AMIBERRY_DATA_DIR' makes more sense, and the amiberry binary should look there for 'data', and in user's $HOMEDIR for configuration files and everything else....ie; $PWD/Amiberry (note: $HOMEDIR/Amiberry is preferable to having all the amiberry directories sprayed into user's ~/ )

My current workaround is to set EXTERNAL_FILES_DIR=/home/username/Amiberry/ and have all the amiberry resources under that directory (including a copy of the 'data' directory & files from the build tree).

I would only consider this a packaging issue when it comes to a binary package release =)

@midwan midwan self-assigned this Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants