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

Fix AUR builds #314

Merged
merged 15 commits into from Oct 22, 2022
Merged

Fix AUR builds #314

merged 15 commits into from Oct 22, 2022

Conversation

exactly-one-kas
Copy link
Collaborator

@exactly-one-kas exactly-one-kas commented Oct 16, 2022

TODO:

  • Replace my repository URL in PKGBUILD with proper URL when approved

This overhauls quite a lot:

  • Fix tests to work on machines without GIT configured
  • Disable tests that touch global configuration by default
  • Remove empty HunkWidget test
  • Make resource install directory configurable
  • Copy resources into output directory so that debugging works
  • Replace "OK" button with "Remind me later" and "Skip this version" for non-updateable builds
  • Allow using system-wide installations of most dependencies
  • Make debug output suppressable and disable it in CI builds

@Murmele this is built upon your branch ArchBuild, but I rebased it onto the current master
@alerque Does this work for you?

Fixes #217 and #20
Relates to #191 and #16

Murmele and others added 7 commits October 16, 2022 11:20
…isable tests that touch global configuration by default Remove empty HunkWidget test Make resource install directory configurable Copy resources into output directory so that debugging works Replace "OK" button with "Remind me later" and "Skip this version" for non-updateable builds Allow using system-wide installations of most dependencies Make debug output suppressable and disable it in CI builds
@exactly-one-kas exactly-one-kas added bug Something isn't working enhancement New feature or request flatpak Flatpak-related linux Linux-related labels Oct 16, 2022
@exactly-one-kas exactly-one-kas self-assigned this Oct 16, 2022
@exactly-one-kas exactly-one-kas added this to the v1.2.0 milestone Oct 18, 2022
@Murmele
Copy link
Owner

Murmele commented Oct 19, 2022

@exactly-one-kas shall we have the PKGBUILD in this repository? I did not understand yet how to push to the AUR git repository but I think we should place it there?

@Murmele
Copy link
Owner

Murmele commented Oct 19, 2022

There are some proposals for the PKGBUILD. I have to test them next days to see what is needed.
https://aur.archlinux.org/packages/gittyup#comment-872036

@exactly-one-kas
Copy link
Collaborator Author

I did not understand yet how to push to the AUR git repository but I think we should place it there?

Currently, gittyup is maintained by @alerque, gittyup-git is maintained by @FabioLolix
We don't have to (or can) push anything

@FabioLolix sorry for only brining you into this now, I overlooked your package ( ._.)
Do these changes work for you as well?

pack/PKGBUILD Outdated Show resolved Hide resolved
@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

For me the arch build works fine. I am able to start the application without any problems

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

How will be the workflow at the end? I think we should not add the pkgbuild to the repository because then it is again at two places, one in the AUR git repo and one here. Would prefer a way as we have it for flatpak.

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

Flatpak is not working yet

flatpak run com.github.Murmele.Gittyup                         
Gtk-Message: 13:30:03.518: Failed to load module "xapp-gtk3-module"
Gtk-Message: 13:30:03.545: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:30:03.545: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Theme dir:  QDir( "/app/share/gittyup/Resources" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )
Theme dir:  QDir( "/app/share/gittyup/Resources" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )
PANIC: unprotected error in call to Lua API (cannot open /app/share/gittyup/Resources/System.lua: Datei oder Verzeichnis nicht gefunden)

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

Flatpak is not working yet

flatpak run com.github.Murmele.Gittyup                         
Gtk-Message: 13:30:03.518: Failed to load module "xapp-gtk3-module"
Gtk-Message: 13:30:03.545: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:30:03.545: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Theme dir:  QDir( "/app/share/gittyup/Resources" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )
Theme dir:  QDir( "/app/share/gittyup/Resources" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )
PANIC: unprotected error in call to Lua API (cannot open /app/share/gittyup/Resources/System.lua: Datei oder Verzeichnis nicht gefunden)

conf/CMakeLists.txt

if(UNIX)
  target_compile_definitions(
    conf
    PRIVATE CONF_DIR="${CMAKE_INSTALL_FULL_DATADIR}/gittyup/Resources"
            L10N_DIR="${CMAKE_INSTALL_FULL_DATADIR}/gittyup/Resources/l10n")
else()

  target_compile_definitions(conf PRIVATE CONF_DIR="" L10N_DIR="")
endif()

image

It seems it does not find the Resources file and therefore it uses the CONF_DIR variable but there the files are not located
image

@exactly-one-kas
Copy link
Collaborator Author

How will be the workflow at the end? I think we should not add the pkgbuild to the repository because then it is again at two places, one in the AUR git repo and one here. Would prefer a way as we have it for flatpak.

That's the idea, but since I made changes to the build system and the file already existed, I used that

Flatpak is not working yet

It worked in my pristine™ Arch VM with Xorg, but I also have pretty much no experience with Flatpak

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

image

Do you know if something like this is working? I did not find any documentation about this PLATFORM_ID

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

I pushed the changes so you can have a look into

@exactly-one-kas
Copy link
Collaborator Author

exactly-one-kas commented Oct 20, 2022

Do you know if something like this is working? I did not find any documentation about this PLATFORM_ID

Here's the documentation: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
That scheme could work, but I think it would be better if you did the following:

if (APPLE OR UNIX)
    set(RESOURCES_PREFIX ${CONTENTS_DIR}/)
endif()


foreach(QM_FILE ${QM_FILES} ${QT_QM_FILES})
  if(EXISTS ${QM_FILE})
    install(
      FILES ${QM_FILE}
      DESTINATION ${RESOURCES_PREFIX}Resources/l10n
      COMPONENT ${GITTYUP_NAME})
  endif()
endforeach()

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

Do you know if something like this is working? I did not find any documentation about this PLATFORM_ID

Here's the documentation: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html That scheme could work, but I think it would be better if you did the following:

if (APPLE OR UNIX)
    set(RESOURCES_PREFIX ${CONTENTS_DIR}/)
endif()


foreach(QM_FILE ${QM_FILES} ${QT_QM_FILES})
  if(EXISTS ${QM_FILE})
    install(
      FILES ${QM_FILE}
      DESTINATION ${RESOURCES_PREFIX}Resources/l10n
      COMPONENT ${GITTYUP_NAME})
  endif()
endforeach()

good idea! Flatpak is also running again

using directly unix makes it even more compact

foreach(QM_FILE ${QM_FILES} ${QT_QM_FILES})
  if(EXISTS ${QM_FILE})
    install(
      FILES ${QM_FILE}
      DESTINATION $<$<PLATFORM_ID:Unix>:${CONTENTS_DIR}/>Resources/l10n
      COMPONENT ${GITTYUP_NAME})
  endif()
endforeach()

but will probably not work.

I used your version

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

How will be the workflow at the end? I think we should not add the pkgbuild to the repository because then it is again at two places, one in the AUR git repo and one here. Would prefer a way as we have it for flatpak.

That's the idea, but since I made changes to the build system and the file already existed, I used that

Flatpak is not working yet

It worked in my pristine™ Arch VM with Xorg, but I also have pretty much no experience with Flatpak

Maybe when the MR is ready we can remove the file and add it here until the arch maintainer will pick it up?

@Murmele
Copy link
Owner

Murmele commented Oct 20, 2022

e17d08f Tested on:

  • Archlinux
  • Flatpak
  • Windows

@Murmele
Copy link
Owner

Murmele commented Oct 21, 2022

ARCH PKGBUILD

I deleted the file from the repository

@Murmele
Copy link
Owner

Murmele commented Oct 21, 2022

I am waiting for a feeback on the Mac build from a friend

@Murmele
Copy link
Owner

Murmele commented Oct 21, 2022

Friend tested on mac, it works fein 😄

@Murmele
Copy link
Owner

Murmele commented Oct 21, 2022

@exactly-one-kas from my side it looks good!

@alerque
Copy link
Contributor

alerque commented Oct 22, 2022

Hey, sorry I've been traveling and knowing this build was problematic left checking in on it until I was back an regular machines. I'll have a look now and see where we are at!

@alerque
Copy link
Contributor

alerque commented Oct 22, 2022

I've had a pull at making a PKGBUILD that builds this PR using as many Arch packaging norms as possible. I used the recently deleted one in this PR for some tips about what changed, but also made a number of improvements and changes (adding missing deps, using sources instead of submodules for the remaining external sources, not running the in the prepare step, getting everything working in a chroot, using ninja install instead of ninja package, etc.).

I can say that the changes in the PR seem to be a huge step in the right direction. Having flags for using system packages for many of the external dependencies is great.

There are still a few more to go, but I don't see any reason not to merge this progress and keep working on the extra bits we need from here.

@Murmele Murmele merged commit d1575bb into Murmele:master Oct 22, 2022
@exactly-one-kas exactly-one-kas deleted the arch-aur-build branch October 22, 2022 14:35
@alerque alerque mentioned this pull request Oct 22, 2022
@Murmele Murmele mentioned this pull request Dec 12, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request flatpak Flatpak-related linux Linux-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AUR Build Error
3 participants