Bug 2448929 - MAME srpm update mame.ini, add ui.ini and patch mame to comply with XDG env dirs.
Summary: MAME srpm update mame.ini, add ui.ini and patch mame to comply with XDG env d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mame
Version: 43
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Julian Sikorski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-03-19 00:38 UTC by David Santamaría Rogado
Modified: 2026-04-25 01:34 UTC (History)
1 user (show)

Fixed In Version: mame-0.287-3.fc43
Clone Of:
Environment:
Last Closed: 2026-04-12 15:37:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
spec patch (7.53 KB, patch)
2026-03-19 00:40 UTC, David Santamaría Rogado
no flags Details | Diff
0002-posixdir-cpp-simplify-osd_subst_env-logic.patch (1.56 KB, patch)
2026-03-19 00:40 UTC, David Santamaría Rogado
no flags Details | Diff
0003-posixdir-cpp-implement-xdg_-_home-variables.patch (1.32 KB, patch)
2026-03-19 00:41 UTC, David Santamaría Rogado
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github mamedev mame pull 14858 0 None open posixdir.cpp: implement XDG_*_HOME variables 2026-03-19 07:34:03 UTC

Description David Santamaría Rogado 2026-03-19 00:38:27 UTC
I wish to apport some changes to MAME srpm.

Add XDG_*_DIRS patch support to MAME, actually MAME is unaware if the env vars doesn't exists on how to proceed and result in lots of warning when launching mame, with the patch it follows XDG spec when the env vars are unset. https://github.com/mamedev/mame/pull/14858

Add ui.ini file to /etc, this also solves that mame creates any file in the working directory.

Rework /etc/mame.ini with new XDG_*DIRS patch and remove now unneeded paths, still retain legacy .mame compatibility.

Reproducible: Always

Comment 1 David Santamaría Rogado 2026-03-19 00:40:07 UTC
Created attachment 2134080 [details]
spec patch

Comment 2 David Santamaría Rogado 2026-03-19 00:40:47 UTC
Created attachment 2134081 [details]
0002-posixdir-cpp-simplify-osd_subst_env-logic.patch

Comment 3 David Santamaría Rogado 2026-03-19 00:41:18 UTC
Created attachment 2134082 [details]
0003-posixdir-cpp-implement-xdg_-_home-variables.patch

Comment 4 Julian Sikorski 2026-03-19 07:34:04 UTC
I will consider this only once it is merged upstream.

Comment 5 David Santamaría Rogado 2026-03-19 08:52:53 UTC
Actually in MAME they don't care about XDG spec so much, I even had to correct cuavas about that the XDG spec says what an app should assume when dir vars are unset or empty and he doesn't believe that is part of the spec. Will try if I can get more attention to the PR.

The actual state makes mame launch lots of warnings if the envs are not defined that is the default state in a fresh system.

About the ui.ini I can add the .config like path after the XDG ones as the actual mame.ini, could be consider that part actually? If you launch mame you can see that it will create files in thw actual working directory if some of the ui.ini vars are not found.

Comment 6 Julian Sikorski 2026-03-19 09:50:58 UTC
The ui.ini part is fine, but please keep the other ini changes minimal, or at least move them to a separate commit. This makes it considerably easier to review. Are you able to submit this as a PR against https://src.fedoraproject.org/rpms/mame?

Comment 7 David Santamaría Rogado 2026-03-19 10:00:27 UTC
Haven't tried, I did't know the ability to do PRs against src.fedora but will try it.

For the PR for XDG envs I have done another attention comment, but I'm not sure if cuavas will get into: https://github.com/mamedev/mame/pull/14858#issuecomment-4088997600

Comment 8 David Santamaría Rogado 2026-03-20 11:18:59 UTC
Julian actually I can't find the settings to add ssh keys, seems to be removed and pagure doesn't take into account the FAS ssh-key.

Comment 9 Julian Sikorski 2026-03-31 07:50:19 UTC
Could you clarify which files mame is creating in the user home dir? I have only noticed this happening for history.db.
I have cherry-picked some of your fixes into 0.287 (not released yet), but I am not sure about all the ui.ini stuff except historypath. I personally have my roms, icons.zip, snap.zip, etc. on a network share. Having to distribute these across multiple hidden folders or store these in a folder needing root access does not seem like a particularly user-friendly ask. Right now I am tending towards only defining historypath in ui.ini and letting users define the rest according to their use case. We are not shipping any roms or support files anymore and haven't done so for a long time.

Comment 10 David Santamaría Rogado 2026-03-31 12:15:09 UTC
With file I mean about history.db every time you call mame from a different directory but also there are more of them, for example, if you need to use audit for merge set (F1 key by default in the cabinet ui), you will get the mame_avail.ini in the working directory. So if you launch from another dir mame you won't have the audit and the previous one will be in the previous working dir, if you audit again you will have another one. Also I remember playing with cheat.ini could happen to be created in the working dir under some circumstances if not defined the path.

The directories as I have done are the ones that result launching mame -showconfig and in the same order. That's why I "messed" also the actual existing ones, to easier adding or removing them in future mame versions by comparing the output.

Is not about providing files but to define paths that mame will point to the working dir where the official release will not because if I not remember wrong, the include a mame.ini and a ui.ini. This makes me wondering if files like cheat.ini (I think it has no legal concerns) could be added into at least as a mame-extra rpm. Actually if someone has in external path, me too, has to define the anyway, having them defined inside the XDG paths (I only have doubts why the share folder, state? share? config?) allow by default if someone use that dirs to backup with the home dir or even to use the XDG paths ability to be moved by env variables.

I'm actually doing some other things, but people in Fedora Chat pointed me to look fedpkg to push into src.fedora, as not being in packagers group doesn't allow me to do it by ssh. Will try to do in the future.

Comment 11 David Santamaría Rogado 2026-03-31 12:16:40 UTC
Forget to say, the example one mame_avail.ini uses "ui_path                   $XDG_CONFIG_HOME/mame/ui".

Comment 12 David Santamaría Rogado 2026-03-31 12:19:43 UTC
One more I have checked is export, if you click (haven't found the shortcut key) all the three export options same the result in the working dir if the ui_path is not set.

Comment 13 David Santamaría Rogado 2026-03-31 12:20:55 UTC
Arg. Sorry about multi commenting, the export is the floppy disk icon in the upper side.

Comment 14 Fedora Update System 2026-04-02 16:45:29 UTC
FEDORA-2026-b50a75530b (mame-0.287-3.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-b50a75530b

Comment 15 Fedora Update System 2026-04-02 17:15:20 UTC
FEDORA-2026-ae4a285bd1 (mame-0.287-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ae4a285bd1

Comment 16 Fedora Update System 2026-04-02 17:15:25 UTC
FEDORA-2026-df0a4875d5 (mame-0.287-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-df0a4875d5

Comment 17 Fedora Update System 2026-04-03 17:31:16 UTC
FEDORA-2026-df0a4875d5 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-df0a4875d5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-df0a4875d5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2026-04-03 17:57:02 UTC
FEDORA-2026-ae4a285bd1 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-ae4a285bd1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-ae4a285bd1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2026-04-03 18:04:51 UTC
FEDORA-2026-b50a75530b has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-b50a75530b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-b50a75530b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2026-04-12 15:37:47 UTC
FEDORA-2026-ae4a285bd1 (mame-0.287-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2026-04-12 15:53:33 UTC
FEDORA-2026-df0a4875d5 (mame-0.287-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2026-04-25 01:34:14 UTC
FEDORA-2026-b50a75530b (mame-0.287-3.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.