fosero / flatpak-overlay

A Gentoo ebuild overlay for flatpak
76 stars 22 forks source link

sys-apps/flatpak: fixed localstatedir. #5

Closed jyelloz closed 7 years ago

jyelloz commented 7 years ago

Previously it was placing stuff in /var/lib/lib/flatpak

fosero commented 7 years ago

Hey, thanks for the report. I don't see the install creating a localstatedir (my files list doesn't show /var at all)? So, how can I check/reproduce this?

Also looking at the config, it should automatically come up with the right dir by default. If it is doing it wrong, the gentoo ebuild (eclass) should be incorrectly overriding something afaics.

jyelloz commented 7 years ago

Do you normally work on flatpak with the --user flag? If so, you'll never run into the problem. I just tried installing some stuff as root and it was placed into /var/lib/lib/flatpak which was confusing. After fixing the value it worked fine.

Regarding the localstatedir option, it is frequently overridden to /var in many official gentoo ebuilds that use autotools, try: grep -ir -- '--localstatedir=' /usr/portage/app-* /usr/portage/gnome-*

fosero commented 7 years ago

Correct, was installing as a user. So this should be ok. Still leaves the question open why it is needed. According to the build files it should be {localstate}/lib/flatpak. Makes me wonder where the spurious lib comes from.

jyelloz commented 7 years ago

There's a mailing list message about this: https://archives.gentoo.org/gentoo-dev/message/6d5ece07355d2edd1240bde0c5d7ed03 The default portage behavior is to set localstatedir=${EPREFIX}/var/lib but packages that use GNU build tools correctly (such as flatpak) expect something like localstatedir=${EPREFIX}/var . Then flatpak's build system appends /lib/flatpak to whatever localstatedir is and you end up with ${EPREFIX}/var/lib/lib/flatpak unless you override portage's defaults during the configure stage.

fosero commented 7 years ago

Thanks for investigating and yeah this should be ok.

However, the moment I pushed it I realized it would be breaking all users who already have runtimes installed systemwide. So I reverted right away.

So we need some sort of migration before making this change.