amiberry
amiberry copied to clipboard
EXTERNAL_FILES_DIR encompasses userspace files
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 =)