Skip to content

Add Support for Typelib Packaging#33

Merged
TheTumultuousUnicornOfDarkness merged 6 commits into
linuxdeploy:masterfrom
danyeaw:typelib-support
Jun 11, 2022
Merged

Add Support for Typelib Packaging#33
TheTumultuousUnicornOfDarkness merged 6 commits into
linuxdeploy:masterfrom
danyeaw:typelib-support

Conversation

@danyeaw

@danyeaw danyeaw commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

This PR adds support for installing girepository typelibs and adds additional default pkg-config locations.

Currently, the plugin is not packaging any typelibs. These allow for apps that use other language bindings to be packaged using linuxdeploy. For example, PyGObject uses the typelibs to introspect bindings for Python.

Additionally, this PR adds additional default locations for Ubuntu in case libgtk-3-dev and librsvg2-dev are not installed. A Python app wouldn't normally require these dependencies, so use default values as a fallback during packaging for linuxdeploy. Although I don't use Ubuntu myself, this is the typical setup, especially with CI runners and Docker.

Finally, it fixes a small issue with the symbolic link step at the end, which fails if the symbolic links already exist.

danyeaw added 2 commits June 5, 2022 14:42
This allows for apps that use other language bindings to be packaged
using linuxdeploy. For example, PyGObject uses the typelibs to
introspect bindings for Python.
Use default locations for Ubuntu in case libgtk-3-dev and librsvg2-dev are
not installed. A Python app wouldn't normally require these dependencies,
so use default values as a fallback during packaging for linuxdeploy.
@TheTumultuousUnicornOfDarkness

Copy link
Copy Markdown
Contributor

Hello,
I am skeptical about /usr/lib/x86_64-linux-gnu: it is too Debian/Ubuntu specific IMHO.
@TheAssassin what is your point of view about this kind of default?

Your PR is breaking CI pipelines: please fix.

@TheAssassin

Copy link
Copy Markdown
Member

I don't think these paths are a big problem They are used during build time only. Also, they are just fallback values, and additional libdirs could always be added, I guess. Typically, the value should be available from pkg-config anyway, right? It will work during runtime anyway, since we set the corresponding environment variables.

The default typelib directory was incorrectly pointing to a location
for rpm based distros which was causing CI to fail with a library
not found error.
@danyeaw

danyeaw commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

I 100% agree that the default paths are completely Debian/Ubuntu specific, but adding a fallback to a typical location I think only helps. I pushed a commit that fixes the default path for the typelibs which should fix the CI failure. 👍

If we wanted to, we could remove libgtk-3-dev as a dependency for CI, because the default path should make it not needed.

@danyeaw

danyeaw commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

@X0rg Could you please restart the CI for me?

@TheAssassin

Copy link
Copy Markdown
Member

Done.

@TheTumultuousUnicornOfDarkness

Copy link
Copy Markdown
Contributor

Ok, if you are fine with these fallback paths, then it looks good to me.
@danyeaw please install missing dependencies in Dockerfiles.

@danyeaw

danyeaw commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

Dockerfiles updated!

@danyeaw

danyeaw commented Jun 9, 2022

Copy link
Copy Markdown
Contributor Author

@X0rg or @TheAssassin could you please reapprove the checks? Thanks!

@danyeaw

danyeaw commented Jun 10, 2022

Copy link
Copy Markdown
Contributor Author

Please approve the workflows again, thanks! 👍

@danyeaw

danyeaw commented Jun 10, 2022

Copy link
Copy Markdown
Contributor Author

One more time please, they are now all passing locally with Docker.

@danyeaw

danyeaw commented Jun 10, 2022

Copy link
Copy Markdown
Contributor Author

I didn't realize this was going to impact the GTK4 builds as well, PR updated to include more dependencies for them. 👍

Could you please reapprove the workflow?

@TheAssassin

Copy link
Copy Markdown
Member

We get notifications for every commit. No need to double the amount of mails. You don't need to ask every time.

@TheAssassin

Copy link
Copy Markdown
Member

Also, you could test changes in your own repository, then you don't have to wait here.

@danyeaw

danyeaw commented Jun 10, 2022

Copy link
Copy Markdown
Contributor Author

@TheAssassin Thanks, sorry for the doubling up. I have never run GitHub Actions on a fork of a repo, and it looks like I can enable them by going to the actions tab, thanks for the pointer!

It looks like all the checks finally passed, apologies again for having to reapprove the checks again and again, it was frustrating for me as well.

@TheAssassin

Copy link
Copy Markdown
Member

@X0rg maybe you could have another look? Please don't hesitate to merge if this works for you.

@TheTumultuousUnicornOfDarkness

Copy link
Copy Markdown
Contributor

LGTM.

@TheTumultuousUnicornOfDarkness TheTumultuousUnicornOfDarkness merged commit 9ce1d78 into linuxdeploy:master Jun 11, 2022
@danyeaw

danyeaw commented Jun 11, 2022

Copy link
Copy Markdown
Contributor Author

@X0rg and @TheAssassin thanks for your support helping to get this merged! 👍

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.

3 participants