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

gschemas.compiled is deleted by make clean but not recompiled by make build #299

Open
smcv opened this issue Sep 26, 2023 · 6 comments
Open

Comments

@smcv
Copy link
Contributor

smcv commented Sep 26, 2023

While updating the Debian packaging of this extension, I noticed that commit 1c0cab6 removed compilation of gschemas.compiled, but that file is still required, and make clean still deletes it. The result is that when we build the package with dpkg in the most obvious way (which does a make clean as its first step, to make the build repeatable), we get a zip file with no compiled schemas and the extension fails to load.

@stuarthayhurst, would you mind expanding on what you meant by "required for upload" in that commit's message?

@stuarthayhurst
Copy link
Collaborator

Since GNOME 44, the gschemas.compiled should be generated by the shell, at install time. (https://gjs.guide/extensions/upgrading/gnome-shell-44.html#gsettings-schema)

The port guide says the extensions must include the gsettings source, and must not include the gschemas.compiled file in the bundle, if targeting only GNOME 44+. As we now only support GNOME 45, I dropped the compiled gsettings file, and clean it with make clean, to prevent it from accidentally being included.

Strange that the extension fails to load, how's it being installed? If it's being simply extracted, perhaps the gsettings aren't being compiled by the shell, and something like the gnome-extensions tool could be used instead?

@smcv
Copy link
Contributor Author

smcv commented Sep 26, 2023

It's being installed system-wide from a .deb package, so perhaps the requirements are different for that scenario.

@stuarthayhurst
Copy link
Collaborator

Hm, in that case the deb will either have to provide the compiled schema, or compile it on the user system as a post-install script.

If you want the deb to provide the compiled schema, I guess either it could be done as a build step for Debian, or we could add another target here, so the Debian build process would be make clean; make schema; make build.

But I feel like other distros / extensions are going to run into this issue, perhaps something upstream could be added, like gnome-extensions compile [UUID], so distros and users have a simple way to compile the schemas for extensions that are extracted into place, rather than gnome-extensions install'd.

@stuarthayhurst
Copy link
Collaborator

Actually, gnome-extensions should compile and include the gsettings anyway, until I think around GNOME 46? Is the extension being built with an older version of gnome-extensions, or is this explicitly disabled somehow?

@smcv
Copy link
Contributor Author

smcv commented Sep 27, 2023

Ah, I think perhaps I see the problem - the Debian packaging is running make build, but then installing ./[email protected] (which was always enough in the past), rather than unpacking the generated zip file into the target directory.

Probably what we really need is to run XDG_DATA_HOME=${DESTDIR}/usr/share gnome-extensions install, or ask upstream for a new gnome-extensions install --system option.

@stuarthayhurst
Copy link
Collaborator

@smcv With https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3042 merged, if you have any packaging concerns still they might need to be raised this cycle, not sure as I haven't been following it too closely, only what needs to be done for developing the extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants