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

Update XDG files and move XDG-related stuff from debian/rules to xdg/CMakeLists.txt #3547

Merged
merged 12 commits into from
Dec 3, 2019

Conversation

scx
Copy link
Contributor

@scx scx commented Oct 20, 2019

The last commit should be verified by the Debian maintainer.
Anyway, all distributions that are not Debian-based (e.g. EL, Fedora, SLE, openSUSE, Mageia, PCLinuxOS, Gentoo, Arch, Slackware, etc.) should benefit from it.

There is one problem with Widelands' CMakeLists.txt. Actually, two problems. First of all, it was written for CMake 2.8.7, so we can't use GNUInstallDirs in here. But this is a relatively small issue. What is more important, it doesn't respect the FHS spec.
For example, if you set prefix to /usr/, it will set CMAKE_INSTALL_PREFIX it to /usr/bin/. So, if you try to install e.g. manual in ${CMAKE_INSTALL_MANDIR}/man6/, it will put it in /usr/bin/share/man/man6/. For obvious reasons, it doesn't make any sense. For now, I use ../, but it should be fixed properly in the future.

scx added 10 commits October 19, 2019 11:43
Sort textdomains in alphanumeric order
 - Add Terminal tag
 - Add StartupNotify tag
 - Add StartupWMClass tag
The icon should be fetched from the desktop file.
 - Update bugtracker url (Launchpad -> GitHub)
 - Update donation url
 - Add faq url
 - Update help url
 - Update homepage url
 - Update translate url
 - icons
 - manual
 - desktop file
 - AppData file
@stonerl
Copy link
Member

stonerl commented Oct 20, 2019

There is one problem with Widelands' CMakeLists.txt. Actually, two problems. First of all, it was written for CMake 2.8.7, so we can't use GNUInstallDirs in here. But this is a relatively small issue.

As soon as we drop support for Ubuntu 14.04 we can raise the minimum required CMake version to 3.x.x (whatever is recent in 16.04)

@stonerl
Copy link
Member

stonerl commented Dec 2, 2019

@Noordfrees could you have a look at this? I dont have a Linux system ATM

@Noordfrees
Copy link
Member

I am totally unfamiliar with the CMake/debian/… stuff, so I can´t review the changes. I can test though, but I don´t quite understand what the change actually is about. So, give me instructions how to test the branch and I´ll test it…

@scx
Copy link
Contributor Author

scx commented Dec 2, 2019

@Noordfrees

I am totally unfamiliar with the CMake/debian/… stuff, so I can´t review the changes. I can test though, but I don´t quite understand what the change actually is about. So, give me instructions how to test the branch and I´ll test it…

Currently, the DEB package handles the installation of desktop and AppData files, manual, icons, etc.
I want to move it to CMake, so every other distribution (EL, Fedora, SLE, openSUSE, Mageia, PCLinuxOS, Gentoo, Arch, Slackware, etc.) would benefit from it.
Moreover, I want to introduce some improvements to ensure that XDG files meet current Freedesktop standards.

Anyway, you can test these changes by using my RPM or flatpak packages.
https://copr.fedorainfracloud.org/coprs/scx/widelands/
https://flathub.org/apps/details/org.widelands.Widelands
https://github.com/scx/widelands-flatpak/releases

@Noordfrees
Copy link
Member

Hm, I did

sudo apt install flatpak
wget https://github.com/scx/widelands-flatpak/releases/download/v21-r24272%2B20191115/widelands-21-r24272+20191115.x86_64.flatpak
flatpak --user install "widelands-21-r24272+20191115.x86_64.flatpak"

And it always says

 4. [✗] org.freedesktop.Platform.openh264               x86_64             19.08              flathub                      594.2 kB / 593.4 kB
Warning: While trying to apply extra data: apply_extra script failed, exit status 256

And the installation fails after that

@scx
Copy link
Contributor Author

scx commented Dec 3, 2019

Hm, I did

sudo apt install flatpak
wget https://github.com/scx/widelands-flatpak/releases/download/v21-r24272%2B20191115/widelands-21-r24272+20191115.x86_64.flatpak
flatpak --user install "widelands-21-r24272+20191115.x86_64.flatpak"

Actually, you don't have to use the single-bundle package. You can install it directly from Flathub.
https://flathub.org/apps/details/org.widelands.Widelands

flatpak install flathub org.widelands.Widelands

or (per-user installation):

flatpak --user install flathub org.widelands.Widelands

And it always says

 4. [✗] org.freedesktop.Platform.openh264               x86_64             19.08              flathub                      594.2 kB / 593.4 kB
Warning: While trying to apply extra data: apply_extra script failed, exit status 256

And the installation fails after that

I am not sure if it applies to Widelands or just openh264 (which isn't even used by this game). Could you just try to run Widelands?

flatpak run org.widelands.Widelands

Anyway, as far as I know, org.freedesktop.Platform.openh264 requires flatpak >= 1.0.9.
https://bugzilla.redhat.com/show_bug.cgi?id=1753591
https://bugzilla.redhat.com/show_bug.cgi?id=1759929

To be honest, the problem doesn't exist in Freedesktop 18.08. I want to stick with it for as long as I can, but Flathub maintainers insisted on updating the runtime, even though 18.08 will be supported for almost one year. Another reason to stay with Freedesktop 18.08 is that 19.08 dropped support for i386 (x86-32).

@stonerl
Copy link
Member

stonerl commented Dec 3, 2019

I could install your package on Linux Mint. Also, the flathub packages. Does only your package contain the changes from this PR or the packages on flathub as well?

What about @Noordfrees install Problems? How can they be circumvented?

Copy link
Member

@Noordfrees Noordfrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, now it works for me :)

@scx
Copy link
Contributor Author

scx commented Dec 3, 2019

@stonerl

I could install your package on Linux Mint. Also, the flathub packages. Does only your package contain the changes from this PR or the packages on flathub as well?

No, they are almost the same. The main difference is that I use one file per module. It speeds up the update process and allows me to easily compare modules (e.g. boost or xmlstarlet) between various packages.
Anyway, I use my personal repo to test new builds before I put them on Flathub.

What about @Noordfrees install Problems? How can they be circumvented?

I believe that the failure is related only to org.freedesktop.Platform.openh264 and org.widelands.Widelands should work without it, at least on Ubuntu 18.04 LTS and Mint 19.
I am not sure about other Debian derivatives. Maybe, just maybe, it could be a problem on Endless OS, just because it uses a different approach when it comes to installing flatpak packages.
flathub/com.xnview.XnRetro#2 (comment)

@stonerl stonerl merged commit 9d51a37 into widelands:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants